handleSystemMessage method Null safety
- Object systemMessage
mustCallSuper">@mustCallSuperprotected">@protected
Handler called for messages received on the SystemChannels.system message channel.
Other bindings may override this to respond to incoming system messages.
Implementation
@protected
@mustCallSuper
Future<void> handleSystemMessage(Object systemMessage) async {
final Map<String, dynamic> message = systemMessage as Map<String, dynamic>;
final String type = message['type'] as String;
switch (type) {
case 'memoryPressure':
handleMemoryPressure();
break;
}
return;
}