Google is committed to advancing racial equity for Black communities. See how.

FuchsiaViewConnection class

*[<Null safety>](https://dart.dev/null-safety)*

Defines a thin wrapper around FuchsiaViewController.

Its primary purpose is to hold on to ViewHolderToken for the lifetime of the view controller, since FuchsiaViewController is agnostic to all Fuchsia data types. (Eventually, FuchsiaView and FuchsiaViewController will be moved to Flutter framework, which cannot have Fuchsia data types.)

Inheritance

Constructors

FuchsiaViewConnection (dynamic viewHolderToken, {dynamic viewRef, FuchsiaViewConnectionCallback? onViewConnected, FuchsiaViewConnectionCallback? onViewDisconnected, FuchsiaViewConnectionStateCallback? onViewStateChanged, bool usePointerInjection = false})

Constructor.

FuchsiaViewConnection.flatland (dynamic viewportCreationToken, {dynamic viewRef, FuchsiaViewConnectionCallback? onViewConnected, FuchsiaViewConnectionCallback? onViewDisconnected, FuchsiaViewConnectionStateCallback? onViewStateChanged, bool usePointerInjection = false})

Properties

connected → bool

Returns true when platform view is connected.
read-only, inherited

hashCode → int

The hash code for this object. ...
read-only, inherited

hostViewRef → dynamic

read-only

onPointerEventFuchsiaPointerEventsCallback?

Callback when pointer events are dispatched on top of child view.
final, inherited

onViewConnectedFuchsiaViewConnectionCallback?

Callback when the connection to child's view is connected to view tree.
final, inherited

onViewDisconnectedFuchsiaViewConnectionCallback?

Callback when the child's view is disconnected from view tree.
final, inherited

onViewStateChangedFuchsiaViewConnectionStateCallback?

Callback when the child view's state changes.
final, inherited

pointerInjector → PointerInjector

Returns the PointerInjector instance used by this connection.
read-only

runtimeType → Type

A representation of the runtime type of the object.
read-only, inherited

usePointerInjection → bool

Set to true if pointer injection into child views should be enabled. This requires the view's ViewRef to be set during construction.
final

viewHolderToken → dynamic

The Gfx view tree token when the view is attached.
final

viewId → int

The raw value of the ViewHolderToken or ViewportCreationToken where this view is attached.
final, inherited

viewport → dynamic

Returns the viewport rect of the child view in parent's coordinates. ...
read-only, inherited

viewportCreationToken → dynamic

The Flatland token when the view is attached.
final

viewRef → dynamic

The handle to the view used for requestFocus calls.
final

whenConnected → Future

The future that completes when the platform view is connected.
read-only, inherited

Methods

clearFocus() Future<void>

inherited

connect({bool hitTestable = true, bool focusable = true, dynamic viewOcclusionHint = Rect.zero}) Future<void>

Connects to the platform view given it's viewId. ...
inherited

dispatchPointerEvent(dynamic event) Future<void>

Dispatch pointer events for the child view. This MUST NOT be called directly.
inherited

dispose() Future<void>

Dispose relevant resources when the view is take OffStage by Flutter. ...
inherited

noSuchMethod(Invocation invocation) dynamic

Invoked when a non-existent method or property is accessed. ...
inherited

onPointerInjectionError() void
requestFocus([int _ = 0]) Future<void>

Requests that focus be transferred to the remote Scene represented by this connection.
override

toString() String

A string representation of this object. ...
inherited

update({bool focusable = true, bool hitTestable = true, dynamic viewOcclusionHint = Rect.zero}) Future<void>

Updates properties on the platform view given it's viewId. ...
inherited

Operators

operator ==(Object other) bool

The equality operator. ...
inherited