Files
eatvio_app/lib/presentation/allergies_screen/bloc/allergies_bloc.dart
2023-12-18 14:47:54 +03:00

21 lines
727 B
Dart

import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
import '/core/app_export.dart';
import 'package:eatvio_app/presentation/allergies_screen/models/allergies_model.dart';
part 'allergies_event.dart';
part 'allergies_state.dart';
/// A bloc that manages the state of a Allergies according to the event that is dispatched to it.
class AllergiesBloc extends Bloc<AllergiesEvent, AllergiesState> {
AllergiesBloc(AllergiesState initialState) : super(initialState) {
on<AllergiesInitialEvent>(_onInitialize);
}
_onInitialize(
AllergiesInitialEvent event,
Emitter<AllergiesState> emit,
) async {
emit(state.copyWith(enterInformationController: TextEditingController()));
}
}