Skip to content

Commit 9a78f04

Browse files
committed
feat(source): integrate logoUrl into edit source state
Adds the `logoUrl` field to the `EditSourceState`. This change updates the state class to manage the new logo URL for the editing workflow. It includes modifications to the constructor, `copyWith` method, `props` for equatability, and the `isFormValid` getter to enforce the new required field.
1 parent 39e0f96 commit 9a78f04

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/content_management/bloc/edit_source/edit_source_state.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ final class EditSourceState extends Equatable {
2626
this.name = '',
2727
this.description = '',
2828
this.url = '',
29+
this.logoUrl = '',
2930
this.sourceType,
3031
this.language,
3132
this.headquarters,
@@ -38,6 +39,7 @@ final class EditSourceState extends Equatable {
3839
final String name;
3940
final String description;
4041
final String url;
42+
final String logoUrl;
4143
final SourceType? sourceType;
4244
final Language? language;
4345
final Country? headquarters;
@@ -50,6 +52,7 @@ final class EditSourceState extends Equatable {
5052
name.isNotEmpty &&
5153
description.isNotEmpty &&
5254
url.isNotEmpty &&
55+
logoUrl.isNotEmpty &&
5356
sourceType != null &&
5457
language != null &&
5558
headquarters != null;
@@ -60,6 +63,7 @@ final class EditSourceState extends Equatable {
6063
String? name,
6164
String? description,
6265
String? url,
66+
String? logoUrl,
6367
ValueGetter<SourceType?>? sourceType,
6468
ValueGetter<Language?>? language,
6569
ValueGetter<Country?>? headquarters,
@@ -72,6 +76,7 @@ final class EditSourceState extends Equatable {
7276
name: name ?? this.name,
7377
description: description ?? this.description,
7478
url: url ?? this.url,
79+
logoUrl: logoUrl ?? this.logoUrl,
7580
sourceType: sourceType != null ? sourceType() : this.sourceType,
7681
language: language != null ? language() : this.language,
7782
headquarters: headquarters != null ? headquarters() : this.headquarters,
@@ -87,6 +92,7 @@ final class EditSourceState extends Equatable {
8792
name,
8893
description,
8994
url,
95+
logoUrl,
9096
sourceType,
9197
language,
9298
headquarters,

0 commit comments

Comments
 (0)