Skip to content

Commit

Permalink
made CommandError.error required non nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
escamoteur committed Nov 14, 2024
1 parent 3523939 commit 7f5e0e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/flutter_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class CommandResult<TParam, TResult> {
/// This sort of objects are emitted on the `.errors` ValueListenable
/// of the Command
class CommandError<TParam> {
final Object? error;
final Object error;
final TParam? paramData;
String? get commandName => command?.name ?? 'Command Property not set';
final Command<TParam, dynamic>? command;
Expand All @@ -98,7 +98,7 @@ class CommandError<TParam> {
this.command,
this.errorReaction,
this.paramData,
this.error,
required this.error,
this.stackTrace,
this.originalError,
});
Expand Down Expand Up @@ -177,7 +177,7 @@ abstract class Command<TParam, TResult> extends CustomValueNotifier<TResult> {
.listen((x, _) {
final originalError = CommandError<TParam>(
paramData: x.paramData,
error: x.error,
error: x.error!,
command: this,
errorReaction: x.errorReaction!,
stackTrace: x.stackTrace,
Expand Down

0 comments on commit 7f5e0e3

Please sign in to comment.