-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18f7343
commit 2e2aeab
Showing
36 changed files
with
421 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
packages/mix/lib/src/attributes/modifiers/modifiers_data_dto.dart
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
.../attributes/modifiers/modifiers_data.dart → ...utes/modifiers/widget_modifiers_data.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import '../../core/modifier.dart'; | ||
|
||
class ModifiersData { | ||
class WidgetModifiersData { | ||
// ignore: avoid-dynamic | ||
final List<WidgetModifierSpec<dynamic>> value; | ||
const ModifiersData(this.value); | ||
const WidgetModifiersData(this.value); | ||
} |
29 changes: 29 additions & 0 deletions
29
packages/mix/lib/src/attributes/modifiers/widget_modifiers_data_dto.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import '../../core/core.dart'; | ||
import 'widget_modifiers_data.dart'; | ||
|
||
class WidgetModifiersDataDto extends Dto<WidgetModifiersData> { | ||
final List<WidgetModifierAttribute> value; | ||
|
||
const WidgetModifiersDataDto(this.value); | ||
|
||
@override | ||
WidgetModifiersDataDto merge(WidgetModifiersDataDto? other) { | ||
if (other == null) return this; | ||
final thisMap = AttributeMap(value); | ||
final otherMap = AttributeMap(other.value); | ||
final mergedMap = thisMap.merge(otherMap).values; | ||
|
||
return WidgetModifiersDataDto(mergedMap); | ||
} | ||
|
||
@override | ||
WidgetModifiersData resolve(MixData mix) { | ||
return WidgetModifiersData(value.map((e) => e.resolve(mix)).toList()); | ||
} | ||
|
||
@override | ||
WidgetModifiersData get defaultValue => const WidgetModifiersData([]); | ||
|
||
@override | ||
List<Object?> get props => [value]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.