When mocking a command with Result return value, a type mismatch error is thrown:
The following _TypeError was thrown while running async test code:
type 'MockCommand<double, ResultDart<void, Exception>>' is not a subtype of type 'Command<double,
ResultDart<void, Exception>>' in type cast
Code:
//This Mocks Properly
Command<double, void> setFoo = MockCommand<double, void>(
initialValue: null,
noReturnValue: true,
);
//This does not
Command<double, Result<void>> updateFoo =
MockCommand<double, Result<void>>(
initialValue: Success(()),
noReturnValue: false,
);