NativeView.fromAndroid constructor

NativeView.fromAndroid(
  1. AndroidNativeView androidNativeView
)

Creates a NativeView from an Android native view.

Implementation

factory NativeView.fromAndroid(AndroidNativeView androidNativeView) {
  return NativeView(
    className: androidNativeView.className,
    text: androidNativeView.text,
    contentDescription: androidNativeView.contentDescription,
    focused: androidNativeView.isFocused,
    enabled: androidNativeView.isEnabled,
    childCount: androidNativeView.childCount,
    resourceName: androidNativeView.resourceName,
    applicationPackage: androidNativeView.applicationPackage,
    children: androidNativeView.children.map(NativeView.fromAndroid).toList(),
  );
}