NativeView class

Represents a native view in the UI hierarchy.

This class provides a unified representation of native views across different platforms (Android and iOS), allowing you to inspect the native UI tree.

Constructors

NativeView({required String? className, required String? text, required String? contentDescription, required bool focused, required bool enabled, required int? childCount, required String? resourceName, required String? applicationPackage, required List<NativeView> children})
Creates a new NativeView.
NativeView.fromAndroid(AndroidNativeView androidNativeView)
Creates a NativeView from an Android native view.
factory
NativeView.fromIOS(IOSNativeView iosNativeView)
Creates a NativeView from an iOS native view.
factory

Properties

applicationPackage String?
The application package of the native view.
getter/setter pair
childCount int?
The number of child views.
getter/setter pair
children List<NativeView>
The list of child native views.
getter/setter pair
className String?
The class name of the native view.
getter/setter pair
contentDescription String?
The content description of the native view.
getter/setter pair
enabled bool
Whether the native view is enabled.
getter/setter pair
focused bool
Whether the native view is focused.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
resourceName String?
The resource name of the native view.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
The text content of the native view.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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