- Created 8 separate BLoCs (Home, Library, BookDetails, AddBook, Scanner, Categories, Wishlist, Settings) - Each BLoC has its own event, state, and bloc files - Added 70 comprehensive tests covering all BLoC functionality - All tests passing (70/70) - Fixed linting issues and updated deprecated APIs - Improved code organization and maintainability
39 lines
760 B
Dart
39 lines
760 B
Dart
import '../models/models.dart';
|
|
|
|
abstract class AppEvent {
|
|
const AppEvent();
|
|
}
|
|
|
|
class ScreenChanged extends AppEvent {
|
|
final AppScreen screen;
|
|
const ScreenChanged(this.screen);
|
|
}
|
|
|
|
class BookClicked extends AppEvent {
|
|
final Book book;
|
|
const BookClicked(this.book);
|
|
}
|
|
|
|
class AddBookClicked extends AppEvent {
|
|
const AddBookClicked();
|
|
}
|
|
|
|
class BookSaved extends AppEvent {
|
|
final Map<String, dynamic> bookData;
|
|
const BookSaved(this.bookData);
|
|
}
|
|
|
|
class BookDeleted extends AppEvent {
|
|
final String id;
|
|
const BookDeleted(this.id);
|
|
}
|
|
|
|
class BookDetected extends AppEvent {
|
|
final Map<String, dynamic> bookData;
|
|
const BookDetected(this.bookData);
|
|
}
|
|
|
|
class SearchChanged extends AppEvent {
|
|
final String query;
|
|
const SearchChanged(this.query);
|
|
} |