runApp function

AppRunner runApp({
  1. required Widget app,
  2. required String appTargetId,
  3. VoidCallback? beforeMount,
  4. MountOptions? mountOptions,
  5. RouterOptions? routerOptions,
  6. DebugOptions? debugOptions,
})

Convenience function that spin a AppRunner.

Arguments

  • app - A widget(any widget). For convenience we've a RadApp widget.

  • appTargetId - id of dom node where you want the app to mount.

  • beforeMount - Callback that'll be fired before app is mount on screen.

  • debugOptions - See DebugOptions.

  • mountOptions - See MountOptions.

  • routerOptions - See RouterOptions.

Implementation

AppRunner runApp({
  required Widget app,
  required String appTargetId,
  VoidCallback? beforeMount,
  MountOptions? mountOptions,
  RouterOptions? routerOptions,
  DebugOptions? debugOptions,
}) {
  return AppRunner(
    app: app,
    appTargetId: appTargetId,
    beforeMount: beforeMount,
    routerOptions: routerOptions,
    debugOptions: debugOptions,
    mountOptions: mountOptions,
  )
    ..start()
    ..scheduleInitialBuild();
}