2023-10-30 18:51:10 +05:30
|
|
|
part of 'home_bloc.dart';
|
|
|
|
|
|
|
|
|
|
@immutable
|
|
|
|
|
sealed class HomeState {} //build state: used to build/re-build the ui
|
|
|
|
|
|
|
|
|
|
abstract class HomeActionState
|
|
|
|
|
extends HomeState {} //action state:used to take some action in the ui
|
|
|
|
|
|
|
|
|
|
final class HomeInitial extends HomeState {}
|
|
|
|
|
|
|
|
|
|
class HomeLoadingState extends HomeState {}
|
|
|
|
|
|
2023-10-31 20:22:44 +05:30
|
|
|
class HomeLoadedSuccessState extends HomeState {
|
|
|
|
|
final List<TaskModel> regularTasks;
|
|
|
|
|
final List<TaskModel> urgentTasks;
|
|
|
|
|
HomeLoadedSuccessState(this.regularTasks, this.urgentTasks);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class HomeLoadedErrorState extends HomeState {}
|
2023-10-30 18:51:10 +05:30
|
|
|
|
|
|
|
|
class HomeErrorState extends HomeState {}
|
|
|
|
|
|
|
|
|
|
class HomeNavigateToUrgentTasksPage extends HomeActionState {}
|
|
|
|
|
|
|
|
|
|
class HomeNavigateToRegularTasksPage extends HomeActionState {}
|