handle api exception with bloc cubit flutter

Viewed 142

how to catch same error in all cubits at once and send it to ui the same code... i want for example wherever server return to me invalid login in api layer send it to bloc layer to clear local storage and send state to ui in order to pop and navigate to login screen so how to inform all blocs with this event at once or how to inform inform auth bloc from all my apis at once like catching same error from all apis and trigger delete event to auth bloc.. I'm using flutter_bloc /http or dio

0 Answers
Related