26 lines
657 B
Dart
26 lines
657 B
Dart
|
|
import '../../api/apiResponse.dart';
|
|
import '../../api/mhsl/message/getMessages/getMessagesCache.dart';
|
|
import '../../api/mhsl/message/getMessages/getMessagesResponse.dart';
|
|
import '../dataHolder.dart';
|
|
|
|
class MessageProps extends DataHolder {
|
|
GetMessagesResponse? _getMessagesResponse;
|
|
GetMessagesResponse get getMessagesResponse => _getMessagesResponse!;
|
|
|
|
@override
|
|
List<ApiResponse?> properties() => [_getMessagesResponse];
|
|
|
|
@override
|
|
void run({renew}) {
|
|
GetMessagesCache(
|
|
renew: renew,
|
|
onUpdate: (GetMessagesResponse data) => {
|
|
_getMessagesResponse = data,
|
|
notifyListeners(),
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|