Skip to content
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 37b09aa

Browse files
committed
small fix
1 parent 7f5e0e3 commit 37b09aa

File tree

4 files changed

+75
-67
lines changed

4 files changed

+75
-67
lines changed

example/pubspec.lock

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
8+
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
99
url: "https://pub.dev"
1010
source: hosted
11-
version: "2.11.0"
11+
version: "2.12.0"
1212
boolean_selector:
1313
dependency: transitive
1414
description:
1515
name: boolean_selector
16-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
16+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
1717
url: "https://pub.dev"
1818
source: hosted
19-
version: "2.1.1"
19+
version: "2.1.2"
2020
characters:
2121
dependency: transitive
2222
description:
@@ -44,23 +44,23 @@ packages:
4444
path: ".."
4545
relative: true
4646
source: path
47-
version: "5.0.0+20"
47+
version: "7.0.0"
4848
flutter_lints:
4949
dependency: "direct dev"
5050
description:
5151
name: flutter_lints
52-
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
52+
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
5353
url: "https://pub.dev"
5454
source: hosted
55-
version: "2.0.1"
55+
version: "2.0.3"
5656
functional_listener:
5757
dependency: "direct main"
5858
description:
5959
name: functional_listener
60-
sha256: ee8ffc29b2448981d96addf44ac9b4af2ba4ca2627979e77d3e6fe59b967ca4f
60+
sha256: c096db771b4ce7ba0f886cc4a761044b11e8276a7bc24cfc812dc4b2bc6f5b16
6161
url: "https://pub.dev"
6262
source: hosted
63-
version: "3.0.0"
63+
version: "4.1.0"
6464
http:
6565
dependency: "direct main"
6666
description:
@@ -81,18 +81,18 @@ packages:
8181
dependency: transitive
8282
description:
8383
name: lints
84-
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
84+
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
8585
url: "https://pub.dev"
8686
source: hosted
87-
version: "2.0.1"
87+
version: "2.1.1"
8888
matcher:
8989
dependency: transitive
9090
description:
9191
name: matcher
92-
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
92+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
9393
url: "https://pub.dev"
9494
source: hosted
95-
version: "0.12.16"
95+
version: "0.12.17"
9696
material_color_utilities:
9797
dependency: transitive
9898
description:
@@ -113,18 +113,18 @@ packages:
113113
dependency: transitive
114114
description:
115115
name: path
116-
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
116+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
117117
url: "https://pub.dev"
118118
source: hosted
119-
version: "1.8.3"
119+
version: "1.9.1"
120120
quiver:
121121
dependency: transitive
122122
description:
123123
name: quiver
124-
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
124+
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
125125
url: "https://pub.dev"
126126
source: hosted
127-
version: "3.2.1"
127+
version: "3.2.2"
128128
sky_engine:
129129
dependency: transitive
130130
description: flutter
@@ -142,26 +142,26 @@ packages:
142142
dependency: transitive
143143
description:
144144
name: stack_trace
145-
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
145+
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
146146
url: "https://pub.dev"
147147
source: hosted
148-
version: "1.11.0"
148+
version: "1.12.0"
149149
stream_channel:
150150
dependency: transitive
151151
description:
152152
name: stream_channel
153-
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
153+
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
154154
url: "https://pub.dev"
155155
source: hosted
156-
version: "2.1.1"
156+
version: "2.1.2"
157157
string_scanner:
158158
dependency: transitive
159159
description:
160160
name: string_scanner
161-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
161+
sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6"
162162
url: "https://pub.dev"
163163
source: hosted
164-
version: "1.2.0"
164+
version: "1.4.0"
165165
term_glyph:
166166
dependency: transitive
167167
description:
@@ -174,10 +174,10 @@ packages:
174174
dependency: transitive
175175
description:
176176
name: test_api
177-
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
177+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
178178
url: "https://pub.dev"
179179
source: hosted
180-
version: "0.6.0"
180+
version: "0.7.0"
181181
typed_data:
182182
dependency: transitive
183183
description:
@@ -195,4 +195,4 @@ packages:
195195
source: hosted
196196
version: "2.1.4"
197197
sdks:
198-
dart: ">=3.3.0-0 <4.0.0"
198+
dart: ">=3.4.0 <4.0.0"

example_command_results/lib/homepage_command_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class _HomePageState extends State<HomePage> {
4848
children: [
4949
Text('An Error has occurred!'),
5050
Text(error.toString()),
51-
if (error != null) Text('For search term: $param')
51+
Text('For search term: $param')
5252
],
5353
),
5454
),

lib/command_builder.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class CommandBuilder<TParam, TResult> extends StatelessWidget {
1313
)? whileExecuting;
1414
final Widget Function(
1515
BuildContext context,
16-
Object?,
16+
Object,
1717
TResult? lastValue,
1818
TParam?,
1919
)? onError;
@@ -62,10 +62,10 @@ extension ToWidgeCommandResult<TParam, TResult>
6262
required Widget Function(TResult result, TParam? param) onData,
6363
Widget Function(TParam? param)? onNullData,
6464
Widget Function(TResult? lastResult, TParam? param)? whileExecuting,
65-
Widget Function(Object? error, TResult? lastResult, TParam? param)? onError,
65+
Widget Function(Object error, TResult? lastResult, TParam? param)? onError,
6666
}) {
6767
if (error != null) {
68-
return onError?.call(error, data, paramData) ?? const SizedBox();
68+
return onError?.call(error!, data, paramData) ?? const SizedBox();
6969
}
7070
if (isExecuting) {
7171
return whileExecuting?.call(data, paramData) ?? const SizedBox();

0 commit comments

Comments
 (0)