getNativeViews method

Future<GetNativeViewsResult> getNativeViews(
  1. NativeSelector selector, {
  2. String? appId,
})

Returns a list of currently visible native UI controls, specified by selector, which are currently visible on screen.

If selector is null, returns the whole native UI tree.

Implementation

Future<GetNativeViewsResult> getNativeViews(
  NativeSelector selector, {
  String? appId,
}) => _platform.action.mobile(
  android: () async => GetNativeViewsResult(
    androidViews: (await _platform.android.getNativeViews(
      _getSafeAndroidSelector(selector),
    )).roots,
    iosViews: [],
  ),
  ios: () async => GetNativeViewsResult(
    androidViews: [],
    iosViews: (await _platform.ios.getNativeViews(
      _getSafeIOSSelector(selector),
      appId: appId,
    )).roots,
  ),
);