Open skyturkish opened 2 years ago
logut state'ini incele üstünde oynama yapabilirsin belki
homeview'da çıkış yapabiliyorum ama settings'de yapamıyorum :lotohmm
galiba navigation işlemleri en başta main.dart'ın içinden yönlendiriyor o yüzden herhangi bir navi işlemi yok aslında, state gönderiyoruz ona göre sayfa döndürüyor gibi gibi
aslında şunu yapar isek, tüm navigation işlemleri de bloc ile birleştirirsek
@immutable
class AppEventGoToRegistration implements AppEvent {
const AppEventGoToRegistration();
}
gibi, galiba sorun çözülür
Exception has occurred. ProviderNotFoundException (Error: Could not find the correct Provider above this BlocListener<AuthBloc, AuthState> Widget
This happens because you used a
BuildContext
that does not include the provider of your choice. There are a few common scenarios:You added a new provider in your
main.dart
and performed a hot-reload. To fix, perform a hot-restart.The provider you are trying to read is in a different route.
Providers are "scoped". So if you insert of provider inside a route, then other routes will not be able to access that provider.
You used a
BuildContext
that is an ancestor of the provider you are trying to read.Make sure that BlocListener<AuthBloc, AuthState> is under your MultiProvider/Provider.
This usually happens when you are creating a provider and trying to read it immediately.
For example, instead of:
consider using
builder
like so:If none of these solutions work, consider asking for help on StackOverflow: https://stackoverflow.com/questions/tagged/flutter )