File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ const double kAppBarDefaultHeight = 56;
2121/// in Flutter for more details.
2222@JsonSerializable ()
2323class AppBarNode extends SceneNode
24- with CustomPropertiesMixin , VariablePropertiesMixin {
24+ with CustomPropertiesMixin , VariablePropertiesMixin , ParentReactionMixin {
2525 @override
2626 final String type = 'appBar' ;
2727
@@ -54,6 +54,16 @@ class AppBarNode extends SceneNode
5454 @override
5555 List <TriggerType > get triggerTypes => [TriggerType .click];
5656
57+ @override
58+ List <ReactionMixin > get reactiveChildren {
59+ final List <ReactionMixin > items = [...properties.actions];
60+ if (properties.leading.icon.show &&
61+ properties.automaticallyImplyLeading == false ) {
62+ items.add (properties.leading);
63+ }
64+ return items;
65+ }
66+
5767 /// Creates a new [AppBarNode] instance from a JSON data.
5868 factory AppBarNode .fromJson (Map json) => _$AppBarNodeFromJson (json);
5969
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ const double kDefaultNavigationBarHeight = 80;
136136/// Inspired from: https://m3.material.io/components/navigation-bar.
137137@JsonSerializable ()
138138class NavigationBarNode extends SceneNode
139- with CustomPropertiesMixin , VariablePropertiesMixin {
139+ with CustomPropertiesMixin , VariablePropertiesMixin , ParentReactionMixin {
140140 @override
141141 final String type = 'navigationBar' ;
142142
@@ -174,6 +174,9 @@ class NavigationBarNode extends SceneNode
174174 @override
175175 List <TriggerType > get triggerTypes => [TriggerType .click];
176176
177+ @override
178+ List <ReactionMixin > get reactiveChildren => properties.items;
179+
177180 /// Creates a [NavigationBarNode] from a JSON object.
178181 factory NavigationBarNode .fromJson (Map json) =>
179182 _$NavigationBarNodeFromJson (json);
You can’t perform that action at this time.
0 commit comments