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
This commit is contained in:
27
bookshelf_flutter/lib/models/category.dart
Normal file
27
bookshelf_flutter/lib/models/category.dart
Normal file
@@ -0,0 +1,27 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
// Category record - using Dart records as data classes
|
||||
typedef Category = ({
|
||||
String id,
|
||||
String name,
|
||||
int count,
|
||||
IconData icon,
|
||||
String colorClass,
|
||||
});
|
||||
|
||||
// Helper function to create a Category record
|
||||
Category createCategory({
|
||||
required String id,
|
||||
required String name,
|
||||
required int count,
|
||||
required IconData icon,
|
||||
required String colorClass,
|
||||
}) {
|
||||
return (
|
||||
id: id,
|
||||
name: name,
|
||||
count: count,
|
||||
icon: icon,
|
||||
colorClass: colorClass,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user