LynxView class
Embeds LynxJS (https://lynxjs.org) as a native platform view.
A LynxViewController must be created and owned by the caller (typically
via late final in a State) and passed in here — see
LynxViewController for the full API (reload, JS bridge, disposal).
Sizing follows normal Flutter platform-view rules: this widget has no
intrinsic size, so wrap it in something that constrains it
(SizedBox, Expanded, AspectRatio, ...).
That size is also what the template load waits for. A template resolves
%, flex and vh against the viewport it has while laying out and does
not redo that afterwards, so the native view holds its first load until
this widget has been given a real size — about a frame, in exchange for a
first paint that is already correct. A LynxView that never gets a size
never loads its bundle.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LynxView
Constructors
-
LynxView({Key? key, required LynxViewController controller, Set<
Factory< ? gestureRecognizers, LynxAndroidViewMode androidViewMode = LynxAndroidViewMode.textureLayer})OneSequenceGestureRecognizer> > -
const
Properties
- androidViewMode → LynxAndroidViewMode
-
How Android embeds the native view. iOS ignores this.
final
- controller → LynxViewController
-
final
-
gestureRecognizers
→ Set<
Factory< ?OneSequenceGestureRecognizer> > -
Gestures the embedded native view is allowed to win from Flutter.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LynxView> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isAndroidHcppSupported(
) → Future< bool> -
Whether LynxAndroidViewMode.hybridCompositionPlusPlus takes effect on
this device and app build.
falseon iOS, on Android below 14, without Impeller on Vulkan, and when the app has not opted in.