forked from eatvio/eatvio_app
21 lines
727 B
Dart
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()));
|
|
}
|
|
}
|