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/app_navigation_screen/models/app_navigation_model.dart';
|
||||
part 'app_navigation_event.dart';
|
||||
part 'app_navigation_state.dart';
|
||||
|
||||
/// A bloc that manages the state of a AppNavigation according to the event that is dispatched to it.
|
||||
class AppNavigationBloc extends Bloc<AppNavigationEvent, AppNavigationState> {
|
||||
AppNavigationBloc(AppNavigationState initialState) : super(initialState) {
|
||||
on<AppNavigationInitialEvent>(_onInitialize);
|
||||
}
|
||||
|
||||
_onInitialize(
|
||||
AppNavigationInitialEvent event,
|
||||
Emitter<AppNavigationState> emit,
|
||||
) async {}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'app_navigation_bloc.dart';
|
||||
|
||||
/// Abstract class for all events that can be dispatched from the
|
||||
///AppNavigation widget.
|
||||
///
|
||||
/// Events must be immutable and implement the [Equatable] interface.
|
||||
@immutable
|
||||
abstract class AppNavigationEvent extends Equatable {}
|
||||
|
||||
/// Event that is dispatched when the AppNavigation widget is first created.
|
||||
class AppNavigationInitialEvent extends AppNavigationEvent {
|
||||
@override
|
||||
List<Object?> get props => [];
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// ignore_for_file: must_be_immutable
|
||||
|
||||
part of 'app_navigation_bloc.dart';
|
||||
|
||||
/// Represents the state of AppNavigation in the application.
|
||||
class AppNavigationState extends Equatable {
|
||||
AppNavigationState({this.appNavigationModelObj});
|
||||
|
||||
AppNavigationModel? appNavigationModelObj;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
appNavigationModelObj,
|
||||
];
|
||||
AppNavigationState copyWith({AppNavigationModel? appNavigationModelObj}) {
|
||||
return AppNavigationState(
|
||||
appNavigationModelObj:
|
||||
appNavigationModelObj ?? this.appNavigationModelObj,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user