*[<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
- Object
- FuchsiaViewController
- FuchsiaViewConnection
Constructors
FuchsiaViewConnection (dynamic viewHolderToken, {dynamic viewRef, FuchsiaViewConnectionCallback? onViewConnected, FuchsiaViewConnectionCallback? onViewDisconnected, FuchsiaViewConnectionStateCallback? onViewStateChanged, bool usePointerInjection = false, bool useFlatland = false})
Constructor.
FuchsiaViewConnection.flatland (dynamic viewportCreationToken, {dynamic viewRef, FuchsiaViewConnectionCallback? onViewConnected, FuchsiaViewConnectionCallback? onViewDisconnected, FuchsiaViewConnectionStateCallback? onViewStateChanged, bool usePointerInjection = false, bool useFlatland = true})
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
onPointerEvent → FuchsiaPointerEventsCallback?
Callback when pointer events are dispatched on top of child view.
final, inherited
onViewConnected → FuchsiaViewConnectionCallback?
Callback when the connection to child's view is connected to view tree.
final, inherited
onViewDisconnected → FuchsiaViewConnectionCallback?
Callback when the child's view is disconnected from view tree.
final, inherited
onViewStateChanged → FuchsiaViewConnectionStateCallback?
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
useFlatland → bool
final
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. This method is the point at which focus handling for
flatland diverges. In Flatland, the Flutter engine holds the ViewRef
and does not provide it to dart code, so we must refer to the child
view by viewId instead
override
requestFocusById(int viewId) Future<void>
Requests that focus be transferred to the child view referred to by
viewId. Note that this method should only be used with the Flatland API
inherited
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