Skip to content

Commit 958e39d

Browse files
committed
SDK Local Storage #6
- Add support for params for navigation action. - Add support for route predefined variable to access data passed to the route. - Fix bad context for IndexedItemProvider's child. - Fix substitution for variables in params for call function action. - Allow variables access in set variable action for text, int and decimal types.
1 parent 2f34dca commit 958e39d

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

lib/src/api/models/action/navigation_action.dart

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,30 @@ class NavigationAction extends ActionModel
4545
/// Destination canvas node's ID.
4646
final String destinationId;
4747

48+
/// Parameters to pass to the destination page.
49+
final Map<String, dynamic> params;
50+
4851
/// Creates a new [NavigationAction].
4952
NavigationAction({
5053
this.navigationType = NavigationType.push,
5154
required this.destinationId,
52-
}) : super(type: ActionType.navigation);
55+
Map<String, String>? params,
56+
}) : params = {...params ?? {}},
57+
super(type: ActionType.navigation);
5358

5459
@override
55-
List<Object?> get props => [destinationId];
60+
List<Object?> get props => [destinationId, navigationType, params];
5661

5762
/// Duplicates this [NavigationAction] with given data overrides.
58-
NavigationAction copyWith(
59-
{NavigationType? navigationType, String? destinationId}) =>
63+
NavigationAction copyWith({
64+
NavigationType? navigationType,
65+
String? destinationId,
66+
Map<String, String>? params,
67+
}) =>
6068
NavigationAction(
6169
navigationType: navigationType ?? this.navigationType,
6270
destinationId: destinationId ?? this.destinationId,
71+
params: {...this.params, ...params ?? {}},
6372
);
6473

6574
/// Creates a new [NavigationAction] instance from a JSON data.

lib/src/api/models/action/navigation_action.g.dart

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)