MethodChannelTwinScreen class
Talks to the Kotlin and Swift code over platform channels.
getState on methodChannel returns the current state; eventChannel
then streams every change. Where the native side is missing (unit tests,
unsupported platforms) it quietly reports TwinPlatformState.fallback.
- Inheritance
-
- Object
- TwinScreenPlatform
- MethodChannelTwinScreen
Constructors
- MethodChannelTwinScreen()
- Creates the channel implementation.
Properties
- eventChannel → EventChannel
-
The channel that streams state changes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- methodChannel → MethodChannel
-
The channel for one-off requests.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rememberDeviceType(
TwinDeviceType type) → Future< void> -
Tells the platform which hardware type a fold revealed, so it can report
it on later launches before any fold is visible (for example on the
cover screen). The default does nothing.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
watchState(
) → Stream< TwinPlatformState> -
Emits the current state as soon as it is known, then every change.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited