system constant

BasicMessageChannel const system = const BasicMessageChannel<dynamic>('flutter/system', const JSONMessageCodec())

A JSON BasicMessageChannel for system events.

Events are exposed as Maps with string keys. The type key specifies the type of the event; the currently supported system event types are those listed below. A handler can be registered using BasicMessageChannel.setMessageHandler.

  • memoryPressure: Indicates that the operating system would like applications to release caches to free up more memory. See WidgetsBindingObserver.didHaveMemoryPressure, which triggers whenever a message is received on this channel.

Implementation

static const BasicMessageChannel<dynamic> system = BasicMessageChannel<dynamic>(
    'flutter/system',
    JSONMessageCodec(),
)