Skip to content

Commit 864b360

Browse files
committed
Fix default trigger types for nodes.
1 parent 00d4b50 commit 864b360

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

lib/src/api/mixins.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,7 @@ mixin ReactionMixin {
208208
}
209209

210210
/// Default value for all nodes that don't override this.
211-
List<TriggerType> get triggerTypes =>
212-
[TriggerType.click, TriggerType.longPress];
211+
List<TriggerType> get triggerTypes => [];
213212
}
214213

215214
/// A mixin that holds the children of the node that are reactive, i.e., can

lib/src/api/nodes/app_bar_node.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ class AppBarNode extends SceneNode
6060
StringValue(name: 'title', value: properties.title),
6161
];
6262

63-
@override
64-
List<TriggerType> get triggerTypes => [];
65-
6663
@override
6764
List<ReactionMixin> get reactiveChildren {
6865
final List<ReactionMixin> items = [...properties.actions];

lib/src/api/nodes/icon_node.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ class IconNode extends SceneNode
8888
setReactionMixin([...reactions]);
8989
}
9090

91+
@override
92+
List<TriggerType> get triggerTypes =>
93+
[TriggerType.click, TriggerType.longPress];
94+
9195
/// Creates an [IconNode] from a JSON data.
9296
factory IconNode.fromJson(Map json) => _$IconNodeFromJson(json);
9397

lib/src/api/nodes/navigation_bar_node.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ class NavigationBarNode extends SceneNode
173173
super.multipleVariables,
174174
});
175175

176-
@override
177-
List<TriggerType> get triggerTypes => [];
178-
179176
@override
180177
List<ReactionMixin> get reactiveChildren => properties.items;
181178

lib/src/api/nodes/tab_bar_node.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class TabBarNode extends SceneNode
7070
}
7171

7272
@override
73-
List<TriggerType> get triggerTypes => [TriggerType.click];
73+
List<TriggerType> get triggerTypes => [TriggerType.changed];
7474

7575
@override
7676
List<ReactionMixin> get reactiveChildren => properties.tabs;

0 commit comments

Comments
 (0)