forked from eatvio/eatvio_app
New screen names
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/date_of_birth_screen/models/date_of_birth_model.dart';
|
||||
part 'date_of_birth_event.dart';
|
||||
part 'date_of_birth_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a DateOfBirth according to the event that is dispatched to it.
|
||||
class DateOfBirthBloc extends Bloc<DateOfBirthEvent, DateOfBirthState> {
|
||||
DateOfBirthBloc(DateOfBirthState initialState) : super(initialState) {
|
||||
on<DateOfBirthInitialEvent>(_onInitialize);
|
||||
}
|
||||
|
||||
_onInitialize(
|
||||
DateOfBirthInitialEvent event,
|
||||
Emitter<DateOfBirthState> emit,
|
||||
) async {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'date_of_birth_bloc.dart';
|
||||
|
||||
/// Abstract class for all events that can be dispatched from the
|
||||
///DateOfBirth widget.
|
||||
///
|
||||
/// Events must be immutable and implement the [Equatable] interface.
|
||||
@immutable
|
||||
abstract class DateOfBirthEvent extends Equatable {}
|
||||
|
||||
/// Event that is dispatched when the DateOfBirth widget is first created.
|
||||
class DateOfBirthInitialEvent extends DateOfBirthEvent {
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'date_of_birth_bloc.dart';
|
||||
|
||||
/// Represents the state of DateOfBirth in the application.
|
||||
class DateOfBirthState extends Equatable {
|
||||
DateOfBirthState({this.dateOfBirthModelObj});
|
||||
|
||||
DateOfBirthModel? dateOfBirthModelObj;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
dateOfBirthModelObj,
|
||||
];
|
||||
DateOfBirthState copyWith({DateOfBirthModel? dateOfBirthModelObj}) {
|
||||
return DateOfBirthState(
|
||||
dateOfBirthModelObj: dateOfBirthModelObj ?? this.dateOfBirthModelObj,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user