fix: flutter web crashes when autoDispose used#1823
Conversation
|
It looks like this patch might be missing some of the |
Not all providers have a |
|
@leehack Thanks! Lgtm! |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1823 +/- ##
==========================================
+ Coverage 95.15% 95.19% +0.04%
==========================================
Files 49 49
Lines 1879 1895 +16
==========================================
+ Hits 1788 1804 +16
Misses 91 91
|
|
@rrousselGit Anyway to release the workaround version to pub.dev? hooks_riverpod still depends on riverpod 2.02 UPDATE: Overriding the dependencies works. |
|
Just tried to use flutter_riverpod master, hoping that I could use the riverpod generator, but I can't start the project with error Waiting for connection from debug service on Chrome...
../../../../.pub-cache/git/riverpod-fe305c02f5cc502c628873401d82a693d56296dc/packages/flutter_riverpod/lib/src/change_notifier_provider/auto_dispose.dart:96:12: Error: The method 'FamilyOverrideImpl' isn't defined for the class 'AutoDisposeChangeNotifierProviderFamily<NotifierT, Arg>'.
- 'AutoDisposeChangeNotifierProviderFamily' is from 'package:flutter_riverpod/src/change_notifier_provider.dart' ('../../../../.pub-cache/git/riverpod-fe305c02f5cc502c628873401d82a693d56296dc/packages/flutter_riverpod/lib/src/change_notifier_provider.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FamilyOverrideImpl'.
return FamilyOverrideImpl<NotifierT, Arg,
^^^^^^^^^^^^^^^^^^ |
fixes #1713
With dart-lang/sdk#50119 (comment)
The dart compiler doesn't understand redefining class with mixin.
This fix can be a workaround until it's fixed from the dart side.