I've ran into the problem that I've accidentally forgot to pass a argument to a command created with Command.createAsyncNoResult. This has led to the following error in the Debugger.
'package:command_it/async_command.dart': Failed assertion: line 53 pos 9: 'param != null || null is TParam': You passed a null value to the command that has a non-nullable type as TParam
Is there a way to enforce that the parameter is passed correctly at compile time?
class MyManager {
// Interacts with a repository that is also final
late final Command<List<String>, void> testCommand = Command
.createAsyncNoResult<List<String>>(
(list) async {
// do stuff
});
}
// some other file
testCommand.run() // uh oh
I've ran into the problem that I've accidentally forgot to pass a argument to a command created with
Command.createAsyncNoResult. This has led to the following error in the Debugger.Is there a way to enforce that the parameter is passed correctly at compile time?