bizz84 / bizz84/localization_riverpod_flutter
Question: Is it possible to use riverpod_generator for appLocalizationsProvider?
- Dominant language
- Dart
- Stars
- 48
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
First of all thank you for such a nice thing as `appLocalizationsProvider`. It's really convenient to use it.
But it turns out that I can't use riverpod_generator for this provider to supress warning: "Generated providers should only depend on other generated providers" without adding ignore for this rule :)
```
@Riverpod(keepAlive: true)
AppLocalizations appLocalizations(AppLocalizationsRef ref) {
...
return ref.state // A value of type 'dynamic' can't be returned from the function 'appLocalizations' because it has a return type of 'AppLocalizations'
}
```
Even if I make something like that: `return ref.state as AppLocalizations`
generated code still uses dynamic :(
```
@ProviderFor(appLocalizations)
final appLocalizationsProvider = Provider.internal ...
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.