Skip to content

Commit 7382aef

Browse files
committed
Add support for non-blocking actions.
1 parent 86211ac commit 7382aef

25 files changed

+180
-45
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ abstract class ActionModel with SerializableMixin {
101101
/// Type of the action.
102102
ActionType type;
103103

104+
/// Whether the action is non-blocking.
105+
bool nonBlocking = false;
106+
104107
/// Creates an [ActionModel] with the given data.
105-
ActionModel({required this.type});
108+
ActionModel({required this.type, this.nonBlocking = false});
106109

107110
/// Factory constructor for creating a new [ActionModel] instance from
108111
/// JSON data.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class ApiCallAction extends ActionModel with EquatableMixin, SerializableMixin {
2020
ApiCallAction({
2121
this.apiId,
2222
Map<String, String>? parameters,
23+
super.nonBlocking,
2324
}) : parameters = parameters ?? {},
2425
super(type: ActionType.callApi);
2526

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

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class CallFunctionAction extends ActionModel
2323
CallFunctionAction({
2424
required this.name,
2525
Map<String, dynamic>? params,
26+
super.nonBlocking,
2627
}) : params = params ?? {},
2728
super(type: ActionType.callFunction);
2829

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

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

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ class LinkAction extends ActionModel with EquatableMixin, SerializableMixin {
1818
final String url;
1919

2020
/// Creates a new [LinkAction] with the given data.
21-
LinkAction({required this.url}) : super(type: ActionType.link);
21+
LinkAction({
22+
required this.url,
23+
super.nonBlocking,
24+
}) : super(type: ActionType.link);
2225

2326
@override
2427
List<Object?> get props => [url];

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

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class LoadFromCloudStorageAction extends ActionModel
3838
this.path = '',
3939
this.documentId = '',
4040
this.variable,
41+
super.nonBlocking,
4142
}) : super(type: ActionType.loadFromCloudStorage);
4243

4344
/// Duplicates this [LoadFromCloudStorageAction] with given data overrides.

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

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

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class NavigationAction extends ActionModel
5353
this.navigationType = NavigationType.push,
5454
required this.destinationId,
5555
Map<String, String>? params,
56+
super.nonBlocking,
5657
}) : params = {...params ?? {}},
5758
super(type: ActionType.navigation);
5859

0 commit comments

Comments
 (0)