refactor: create separate BLoCs for each screen with comprehensive tests
- 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
This commit is contained in:
20
bookshelf_flutter/lib/bloc/scanner/scanner_event.dart
Normal file
20
bookshelf_flutter/lib/bloc/scanner/scanner_event.dart
Normal file
@@ -0,0 +1,20 @@
|
||||
abstract class ScannerEvent {
|
||||
const ScannerEvent();
|
||||
}
|
||||
|
||||
class StartScanning extends ScannerEvent {
|
||||
const StartScanning();
|
||||
}
|
||||
|
||||
class StopScanning extends ScannerEvent {
|
||||
const StopScanning();
|
||||
}
|
||||
|
||||
class BookDetected extends ScannerEvent {
|
||||
final Map<String, dynamic> bookData;
|
||||
const BookDetected(this.bookData);
|
||||
}
|
||||
|
||||
class ClearDetectedBook extends ScannerEvent {
|
||||
const ClearDetectedBook();
|
||||
}
|
||||
Reference in New Issue
Block a user