bootstrapMultiViewApp function
Boots app with runMultiApp on desktop Multiview hosts, runApp elsewhere.
Safe even when Infospect.ensureInitialized was never called and Infospect logging is disabled — hosts with Multiview natives should always use this (or Infospect.run) instead of plain runApp on desktop.
Optional config overrides Infospect's default Multiview
MultiAppConfig (native title-bar buttons enabled).
Implementation
void bootstrapMultiViewApp(
Widget app, {
MultiAppConfig? config,
bool? isWeb,
bool? desktopOs,
}) {
if (isMultiViewDesktopBootstrapRequired(isWeb: isWeb, desktopOs: desktopOs)) {
runMultiApp(
home: (context, id) => app,
config: config ?? infospectMultiAppConfig(),
);
} else {
runApp(app);
}
}