Skip to content

Commit 7f14793

Browse files
committed
feat(source): integrate logoUrl into create source state
Adds the `logoUrl` field to the `CreateSourceState`. This change updates the state class to manage the new logo URL, including modifications to the constructor, `copyWith` method, `props` for equatability, and the `isFormValid` getter to enforce the new required field.
1 parent 08b4b42 commit 7f14793

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/content_management/bloc/create_source/create_source_state.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ final class CreateSourceState extends Equatable {
2626
this.name = '',
2727
this.description = '',
2828
this.url = '',
29+
this.logoUrl = '',
2930
this.sourceType,
3031
this.language,
3132
this.headquarters,
@@ -37,6 +38,7 @@ final class CreateSourceState extends Equatable {
3738
final String name;
3839
final String description;
3940
final String url;
41+
final String logoUrl;
4042
final SourceType? sourceType;
4143
final Language? language;
4244
final Country? headquarters;
@@ -48,6 +50,7 @@ final class CreateSourceState extends Equatable {
4850
name.isNotEmpty &&
4951
description.isNotEmpty &&
5052
url.isNotEmpty &&
53+
logoUrl.isNotEmpty &&
5154
sourceType != null &&
5255
language != null &&
5356
headquarters != null;
@@ -57,6 +60,7 @@ final class CreateSourceState extends Equatable {
5760
String? name,
5861
String? description,
5962
String? url,
63+
String? logoUrl,
6064
ValueGetter<SourceType?>? sourceType,
6165
ValueGetter<Language?>? language,
6266
ValueGetter<Country?>? headquarters,
@@ -68,6 +72,7 @@ final class CreateSourceState extends Equatable {
6872
name: name ?? this.name,
6973
description: description ?? this.description,
7074
url: url ?? this.url,
75+
logoUrl: logoUrl ?? this.logoUrl,
7176
sourceType: sourceType != null ? sourceType() : this.sourceType,
7277
language: language != null ? language() : this.language,
7378
headquarters: headquarters != null ? headquarters() : this.headquarters,
@@ -82,6 +87,7 @@ final class CreateSourceState extends Equatable {
8287
name,
8388
description,
8489
url,
90+
logoUrl,
8591
sourceType,
8692
language,
8793
headquarters,

0 commit comments

Comments
 (0)