import 'package:equatable/equatable.dart'; import '../../../models/models.dart'; class HomeState extends Equatable { final AppScreen currentScreen; final bool isLoading; final String? errorMessage; const HomeState({ this.currentScreen = AppScreen.library, this.isLoading = false, this.errorMessage, }); factory HomeState.initial() { return const HomeState( isLoading: true, ); } HomeState copyWith({ AppScreen? currentScreen, bool? isLoading, String? errorMessage, }) { return HomeState( currentScreen: currentScreen ?? this.currentScreen, isLoading: isLoading ?? this.isLoading, errorMessage: errorMessage ?? this.errorMessage, ); } @override List get props => [ currentScreen, isLoading, errorMessage, ]; }