pmu/lib/presentation/home_page/bloc/state.dart

36 lines
698 B
Dart
Raw Permalink Normal View History

2024-12-17 22:28:51 +04:00
import 'package:bloc/bloc.dart';
import 'package:equatable/equatable.dart';
import '../../../data/dtos/hero_dto.dart';
import '../../../data/repositories/hero_repository.dart';
// States
abstract class HeroListState extends Equatable {
@override
List<Object> get props => [];
}
class HeroListInitial extends HeroListState {}
class HeroListLoading extends HeroListState {}
class HeroListLoaded extends HeroListState {
final List<HeroDto> heroes;
HeroListLoaded(this.heroes);
@override
List<Object> get props => [heroes];
}
class HeroListError extends HeroListState {
final String message;
HeroListError(this.message);
@override
List<Object> get props => [message];
}