Refactor codebase resolving warnings and remove self-package imports
This commit is contained in:
27
lib/model/message/messageProps.dart
Normal file
27
lib/model/message/messageProps.dart
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
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() {
|
||||
return [_getMessagesResponse];
|
||||
}
|
||||
|
||||
@override
|
||||
void run({renew}) {
|
||||
GetMessagesCache(
|
||||
renew: renew,
|
||||
onUpdate: (GetMessagesResponse data) => {
|
||||
_getMessagesResponse = data,
|
||||
notifyListeners(),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user