AndroidViewController class abstract

Controls an Android view that is composed using a GL texture.

Typically created with PlatformViewsService.initAndroidView.

Inheritance
Implementers

Properties

awaitingCreation bool
True if create has not been successfully called the platform view.
no setteroverride
createdCallbacks List<PlatformViewCreatedCallback>
The created callbacks that are invoked after the platform view has been created.
no setter
hashCode int
The hash code for this object.
no setterinherited
isCreated bool
Whether the platform view has already been created.
no setter
pointTransformer PointTransformer
Converts a given point from the global coordinate system in logical pixels to the local coordinate system for this box.
getter/setter pair
requiresViewComposition bool
True if the view requires native view composition rather than using a texture to render.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textureId int?
Returns the texture entry id that the Android view is rendering into.
no setter
viewId int
The unique identifier of the Android view controlled by this controller.
final

Methods

addOnPlatformViewCreatedListener(PlatformViewCreatedCallback listener) → void
Adds a callback that will get invoke after the platform view has been created.
clearFocus() Future<void>
Clears the focus from the Android View if it is focused.
override
create({Size? size, Offset? position}) Future<void>
Creates the platform view with the initial size.
override
dispatchPointerEvent(PointerEvent event) Future<void>
Converts the PointerEvent and sends an Android MotionEvent to the view.
override
dispose() Future<void>
Disposes the Android view.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeOnPlatformViewCreatedListener(PlatformViewCreatedCallback listener) → void
Removes a callback added with addOnPlatformViewCreatedListener.
sendMotionEvent(AndroidMotionEvent event) Future<void>
Sends an Android MotionEvent to the view.
setLayoutDirection(TextDirection layoutDirection) Future<void>
Sets the layout direction for the Android view.
setOffset(Offset off) Future<void>
Sets the offset of the platform view.
setSize(Size size) Future<Size>
Sizes the Android View.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

pointerAction(int pointerId, int action) int
Creates a masked Android MotionEvent action value for an indexed pointer.

Constants

kActionCancel → const int
Action code for when a motion event has been canceled.
kActionDown → const int
Action code for when a primary pointer touched the screen.
kActionMove → const int
Action code for when the event only includes information about pointer movement.
kActionPointerDown → const int
Action code for when a secondary pointer touched the screen.
kActionPointerUp → const int
Action code for when a secondary pointer stopped touching the screen.
kActionUp → const int
Action code for when a primary pointer stopped touching the screen.
kAndroidLayoutDirectionLtr → const int
Android's View.LAYOUT_DIRECTION_LTR value.
kAndroidLayoutDirectionRtl → const int
Android's View.LAYOUT_DIRECTION_RTL value.
kInputDeviceSourceMouse → const int
Android's InputDevice.SOURCE_MOUSE
kInputDeviceSourceStylus → const int
Android's InputDevice.SOURCE_STYLUS
kInputDeviceSourceTouchPad → const int
Android's InputDevice.SOURCE_TOUCHPAD
kInputDeviceSourceTouchScreen → const int
Android's InputDevice.SOURCE_TOUCHSCREEN
kInputDeviceSourceUnknown → const int
Android's InputDevice.SOURCE_UNKNOWN