const constructure
This commit is contained in:
@@ -17,7 +17,9 @@ class CategoryLocalDataProvider {
|
||||
CategoryLocalDataProvider(this._databaseHelper);
|
||||
|
||||
final Map<String, List<CategoryDto>> _queryCache = {};
|
||||
final Duration _cacheExpiry = Duration(minutes: AppConstant.cacheExpire);
|
||||
final Duration _cacheExpiry = const Duration(
|
||||
minutes: AppConstant.cacheExpire,
|
||||
);
|
||||
final Map<String, DateTime> _cacheTimestamps = {};
|
||||
|
||||
Future<DC<CategoryFailure, void>> saveCategoriesBatch(
|
||||
@@ -203,7 +205,7 @@ class CategoryLocalDataProvider {
|
||||
|
||||
if (maps.isEmpty) {
|
||||
log('❌ Category not found: $id', name: _logName);
|
||||
return DC.error(CategoryFailure.empty());
|
||||
return DC.error(const CategoryFailure.empty());
|
||||
}
|
||||
|
||||
final category = CategoryDto.fromMap(maps.first);
|
||||
|
||||
@@ -29,7 +29,7 @@ class CategoryRemoteDataProvider {
|
||||
);
|
||||
|
||||
if (response.data['data'] == null) {
|
||||
return DC.error(CategoryFailure.empty());
|
||||
return DC.error(const CategoryFailure.empty());
|
||||
}
|
||||
|
||||
final categories = ListCategoryDto.fromJson(
|
||||
|
||||
Reference in New Issue
Block a user