Files
bookshelf/bookshelf_flutter/lib/features/home/bloc/home_state.dart
Yuriy Panov 2f97873095 Fix import paths and test issues
- Fixed test file import paths to point to correct Bloc file locations
- Fixed Bloc file import paths for models (../../../models/models.dart)
- Added explicit type annotations to resolve null safety warnings
- Fixed null safety issues in wishlist_bloc_test.dart
- All 70 tests now passing
2026-02-04 15:28:59 +06:00

39 lines
840 B
Dart

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<Object?> get props => [
currentScreen,
isLoading,
errorMessage,
];
}