forked from eatvio/eatvio_app
24 lines
869 B
Dart
24 lines
869 B
Dart
import 'package:equatable/equatable.dart';
|
|
import 'package:flutter/material.dart';
|
|
import '/core/app_export.dart';
|
|
import 'package:eatvio_app/presentation/credentials_screen/models/credentials_model.dart';
|
|
part 'credentials_event.dart';
|
|
part 'credentials_state.dart';
|
|
|
|
/// A bloc that manages the state of a Credentials according to the event that is dispatched to it.
|
|
class CredentialsBloc extends Bloc<CredentialsEvent, CredentialsState> {
|
|
CredentialsBloc(CredentialsState initialState) : super(initialState) {
|
|
on<CredentialsInitialEvent>(_onInitialize);
|
|
}
|
|
|
|
_onInitialize(
|
|
CredentialsInitialEvent event,
|
|
Emitter<CredentialsState> emit,
|
|
) async {
|
|
emit(state.copyWith(
|
|
valueController: TextEditingController(),
|
|
passwordController: TextEditingController(),
|
|
passwordConfirmationController: TextEditingController()));
|
|
}
|
|
}
|