const constructure
This commit is contained in:
@@ -17,7 +17,9 @@ class ProductLocalDataProvider {
|
||||
final _logName = 'ProductLocalDataProvider';
|
||||
|
||||
final Map<String, List<ProductDto>> _queryCache = {};
|
||||
final Duration _cacheExpiry = Duration(minutes: AppConstant.cacheExpire);
|
||||
final Duration _cacheExpiry = const Duration(
|
||||
minutes: AppConstant.cacheExpire,
|
||||
);
|
||||
final Map<String, DateTime> _cacheTimestamps = {};
|
||||
|
||||
ProductLocalDataProvider(this._databaseHelper);
|
||||
@@ -281,7 +283,7 @@ class ProductLocalDataProvider {
|
||||
|
||||
if (maps.isEmpty) {
|
||||
log('❌ Product not found: $id', name: _logName);
|
||||
return DC.error(ProductFailure.empty());
|
||||
return DC.error(const ProductFailure.empty());
|
||||
}
|
||||
|
||||
final variants = await _getProductVariants(db, id);
|
||||
|
||||
@@ -41,7 +41,7 @@ class ProductRemoteDataProvider {
|
||||
);
|
||||
|
||||
if (response.data['data'] == null) {
|
||||
return DC.error(ProductFailure.empty());
|
||||
return DC.error(const ProductFailure.empty());
|
||||
}
|
||||
|
||||
final categories = ListProductDto.fromJson(
|
||||
|
||||
Reference in New Issue
Block a user