Ahmed Elsayed
Ahmed Elsayed
@rrousselGit Should using `ProviderScope(parent:` just in the main trigger the issue?
> I've been doing that for a while without seeing this issue. But your method is way better. I need it for other things (warming-up services and stuff). The thing...
> @AhmedLSayed9 - I imagine you've thought it through already, but can you not take the approach you suggested to me? For async providers, no. You better warm-up them in...
> In the main it should be alright It triggered the same issue when only used in the `main`, should I create a sample that reproduces it? > but why...
I find the pros outweigh the cons here. I tried making mixins for both autoDispose and non-autoDispose providers and ended up using `internal` class & ignore some lints to make...
```dart extension AutoDisposeRefExtension on AutoDisposeRef { /// Keep listening to an autoDispose provider until last listener is removed. /// /// This is primarily used to initialize and preserve the state...
> No it isn't. No docs recommend putting init logic in the main. Instead it is recommended to use a ConsumerWidget at the root I get that and I actually...
> I don't see the relationship between this and disposing the root container. I'd be able to do the following at my restartApp method: ```dart final rootContainer = ProviderScope.containerOf(context, rootContainer:...
That's what i'm doing currently. I was looking for a better and direct approach same as the `rootNavigator` of Navigator class. I think this has a low priority.
> body: ListView.builder(itemBuilder: (context, index) { if (index >= items.length) return null; return Text(items[index]); }), I think you should do `if (index >= items.length || items[index] == 'Loading') return null;`