Files
packet/lib/presentation/bloc/app/app_state.dart

33 lines
839 B
Dart
Raw Normal View History

import 'package:equatable/equatable.dart';
import '../../../domain/entities/destino.dart';
class AppState extends Equatable {
final int currentIndex;
final Destino? destinoActivo;
final List<Destino> destinos;
final bool isLoading;
const AppState({
this.currentIndex = 0,
this.destinoActivo,
this.destinos = const [],
this.isLoading = false,
});
AppState copyWith({
int? currentIndex,
Destino? destinoActivo,
List<Destino>? destinos,
bool? isLoading,
}) =>
AppState(
currentIndex: currentIndex ?? this.currentIndex,
destinoActivo: destinoActivo ?? this.destinoActivo,
destinos: destinos ?? this.destinos,
isLoading: isLoading ?? this.isLoading,
);
@override
List<Object?> get props => [currentIndex, destinoActivo, destinos, isLoading];
}