I am using the meteor liberia with flutter_bloc
i have this function
on<InitialPlansEvent>(
(event, emit) async {
emit(state.copyWith(loading: true));
await emit.onEach(streamController, onData: (data) {
var refactorMap = data.map((key, value) => MapEntry(key, value)).values.toList();
List<PlansModel> plansList = refactorMap.map<PlansModel>((e) => PlansModel.fromJson(e)).toList();
print(data);
add(SuccessPlansEvent(data: plansList));
});
emit(state.copyWith(loading: false));
},
transformer: restartable(),
);
I want it to be broadcast
emit(state.copyWith(loading: false));
but it's like it never finished emitting the emit.onEach function.
I am using the meteor liberia with flutter_bloc
i have this function
I want it to be broadcast
emit(state.copyWith(loading: false));
but it's like it never finished emitting the emit.onEach function.