claude refactorings, flutter best practices, platform dependent changes, general cleanup
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import '../request_cache.dart';
|
||||
import 'get_holidays.dart';
|
||||
import 'get_holidays_response.dart';
|
||||
|
||||
class GetHolidaysCache extends SimpleCache<GetHolidaysResponse> {
|
||||
GetHolidaysCache({super.onUpdate, super.renew})
|
||||
: super(
|
||||
cacheTime: RequestCache.cacheDay,
|
||||
loader: () => GetHolidays().query(),
|
||||
fromJson: (json) => GetHolidaysResponse(
|
||||
(json['data'] as List)
|
||||
.map((i) => GetHolidaysResponseObject.fromJson(i as Map<String, dynamic>))
|
||||
.toList(),
|
||||
),
|
||||
) {
|
||||
start('state-holidays');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user