-
-
Notifications
You must be signed in to change notification settings - Fork 153
registerFactoryParam does not allow List<whatever> params #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I got the same error, seems this one is not work with built_value too |
Yeah, I've tried this new feature too and can confirm that you cannot pass BuiltValue classes as params. But everything works fine if you replace the following lines in assert(
param1 == null || param1.runtimeType == param1Type,
'Incompatible Type passed as param1\n'
'expected: $param1Type actual: ${param1.runtimeType}');
assert(
param2 == null || param2.runtimeType == param2Type,
'Incompatible Type passed as param2\n'
'expected: $param2Type actual: ${param2.runtimeType}'); with assert(
param1 == null || param1 is P1,
'Incompatible Type passed as param1\n'
'expected: $param1Type actual: ${param1.runtimeType}');
assert(
param2 == null || param2 is P2,
'Incompatible Type passed as param2\n'
'expected: $param2Type actual: ${param2.runtimeType}'); |
@votruk but this isn't what should be checked. This should check if the passed parameter has the same type as the one the factory was registered with. |
so I think I will drop this test |
Should work with the next version |
It seems that providing a List of a class does not work with registerFactoryParam.
There error shown is
version: 4.0.1
The text was updated successfully, but these errors were encountered: