You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and here is the error i get when running build_runner
[INFO] Generating build script...
[INFO] Generating build script completed, took 675ms
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 112ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 670ms
[INFO] Running build...
[INFO] 1.2s elapsed, 1/3 actions completed.
[INFO] 2.2s elapsed, 1/3 actions completed.
[INFO] 3.3s elapsed, 1/3 actions completed.
[INFO] 10.7s elapsed, 1/3 actions completed.
[INFO] 13.3s elapsed, 2/3 actions completed.
[INFO] 14.5s elapsed, 8/9 actions completed.
[SEVERE] sealed_generators:sealed_generators on lib/src/cubits/login/request/code/login_state.dart:
"SealedError{message={internal error},cause={check failed}}"
[INFO] Running build completed, took 14.6s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 58ms
[SEVERE] Failed after 14.7s
pub finished with exit code 1
I tried different things found out whenever I use the type VoidCallback or a generic type that has that type like Consumable<VoidCallback> as the method argument, code generation fails
The text was updated successfully, but these errors were encountered:
I think analyzer unwraps typedefs by default,
but by using this workaround we are forcing dart_sealed to use typedef instead.
I should find a way to check functional types, then I can fix this issue. @easazade
FatulM
changed the title
code generation fails when using VoidCallback in sealed classes
Functional types are not supported as field types
Aug 10, 2021
here is the code for the sealed class
and here is the error i get when running
build_runner
I tried different things found out whenever I use the type
VoidCallback
or a generic type that has that type likeConsumable<VoidCallback>
as the method argument, code generation failsThe text was updated successfully, but these errors were encountered: