system constant

BasicMessageChannel<Object?> const system

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<Object?> system = BasicMessageChannel<Object?>(
    'flutter/system',
    JSONMessageCodec(),
);