initScreen method

Future<void> initScreen({
  1. ScreenInfoSource screenInfoSource = ScreenInfoSource.flutter,
})

Implementation

Future<void> initScreen({ScreenInfoSource screenInfoSource = ScreenInfoSource.flutter}) async {
  if (screenInfoSource == ScreenInfoSource.flutter) {
    // use ui.window, better used in flutter app
    await _initFromUIWindow();
  } else if (screenInfoSource == ScreenInfoSource.native) {
    // use method channel, faster when use cached flutter engine in native app
    await _initFromMethodChannel();
  }
}