MethodChannelFlutterSystemEvents class

An implementation of FlutterSystemEventsPlatform that uses method channels.

Inheritance

Properties

eventChannel EventChannel
The event channel used to receive native system events.
final
events Stream<SystemEvent>
Stream of decoded platform events.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

currentBattery() Future<BatteryEvent>
Returns the current battery state.
override
currentNetwork() Future<NetworkEvent>
Returns the current network connectivity state.
override
currentOrientation() Future<OrientationEvent>
Returns the current screen orientation.
override
currentScreenBrightness() Future<ScreenEvent>
Returns the current screen brightness.
override
dispose() Future<void>
Stops active platform listeners.
override
initialize({SystemEventsConfig config = const SystemEventsConfig.defaults()}) Future<void>
Starts platform listeners for the enabled event groups in config.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited