import 'dart:convert'; import '../../../requestCache.dart'; import 'getMessages.dart'; import 'getMessagesResponse.dart'; class GetMessagesCache extends RequestCache { GetMessagesCache({onUpdate, renew}) : super(RequestCache.cacheMinute, onUpdate, renew: renew) { start('MarianumMobile', 'message'); } @override GetMessagesResponse onLocalData(String json) => GetMessagesResponse.fromJson(jsonDecode(json)); @override Future onLoad() => GetMessages().run(); }