Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
escamoteur committed Nov 14, 2024
1 parent 7f5e0e3 commit 37b09aa
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 67 deletions.
52 changes: 26 additions & 26 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.12.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
characters:
dependency: transitive
description:
Expand Down Expand Up @@ -44,23 +44,23 @@ packages:
path: ".."
relative: true
source: path
version: "5.0.0+20"
version: "7.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c
sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.0.3"
functional_listener:
dependency: "direct main"
description:
name: functional_listener
sha256: ee8ffc29b2448981d96addf44ac9b4af2ba4ca2627979e77d3e6fe59b967ca4f
sha256: c096db771b4ce7ba0f886cc4a761044b11e8276a7bc24cfc812dc4b2bc6f5b16
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "4.1.0"
http:
dependency: "direct main"
description:
Expand All @@ -81,18 +81,18 @@ packages:
dependency: transitive
description:
name: lints
sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593"
sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
version: "2.1.1"
matcher:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
Expand All @@ -113,18 +113,18 @@ packages:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.1"
quiver:
dependency: transitive
description:
name: quiver
sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
url: "https://pub.dev"
source: hosted
version: "3.2.1"
version: "3.2.2"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -142,26 +142,26 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.12.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.4.0"
term_glyph:
dependency: transitive
description:
Expand All @@ -174,10 +174,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.7.0"
typed_data:
dependency: transitive
description:
Expand All @@ -195,4 +195,4 @@ packages:
source: hosted
version: "2.1.4"
sdks:
dart: ">=3.3.0-0 <4.0.0"
dart: ">=3.4.0 <4.0.0"
2 changes: 1 addition & 1 deletion example_command_results/lib/homepage_command_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class _HomePageState extends State<HomePage> {
children: [
Text('An Error has occurred!'),
Text(error.toString()),
if (error != null) Text('For search term: $param')
Text('For search term: $param')
],
),
),
Expand Down
6 changes: 3 additions & 3 deletions lib/command_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CommandBuilder<TParam, TResult> extends StatelessWidget {
)? whileExecuting;
final Widget Function(
BuildContext context,
Object?,
Object,
TResult? lastValue,
TParam?,
)? onError;
Expand Down Expand Up @@ -62,10 +62,10 @@ extension ToWidgeCommandResult<TParam, TResult>
required Widget Function(TResult result, TParam? param) onData,
Widget Function(TParam? param)? onNullData,
Widget Function(TResult? lastResult, TParam? param)? whileExecuting,
Widget Function(Object? error, TResult? lastResult, TParam? param)? onError,
Widget Function(Object error, TResult? lastResult, TParam? param)? onError,
}) {
if (error != null) {
return onError?.call(error, data, paramData) ?? const SizedBox();
return onError?.call(error!, data, paramData) ?? const SizedBox();
}
if (isExecuting) {
return whileExecuting?.call(data, paramData) ?? const SizedBox();
Expand Down
Loading

0 comments on commit 37b09aa

Please sign in to comment.