forked from eatvio/eatvio_app
24 lines
762 B
Dart
24 lines
762 B
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:flutter/material.dart';
|
|
import '/core/app_export.dart';
|
|
import 'package:eatvio_app/presentation/name_screen/models/name_model.dart';
|
|
part 'name_event.dart';
|
|
part 'name_state.dart';
|
|
|
|
/// A bloc that manages the state of a Name according to the event that is dispatched to it.
|
|
class NameBloc extends Bloc<NameEvent, NameState> {
|
|
NameBloc(NameState initialState) : super(initialState) {
|
|
on<NameInitialEvent>(_onInitialize);
|
|
}
|
|
|
|
_onInitialize(
|
|
NameInitialEvent event,
|
|
Emitter<NameState> emit,
|
|
) async {
|
|
emit(state.copyWith(
|
|
valueController: TextEditingController(),
|
|
valueController1: TextEditingController(),
|
|
valueController2: TextEditingController()));
|
|
}
|
|
}
|