yRunApp function

void yRunApp({
  1. required Future<YPage> onLaunchPage(),
  2. MaterialColor? primarySwatch,
  3. required dynamic onYConfig(),
  4. dynamic builder(
    1. BuildContext context,
    2. Widget? child
    )?,
  5. ThemeData? theme,
  6. dynamic onYRan()?,
})

YFree启动函数

Implementation

void yRunApp({
  required Future<YPage> Function() onLaunchPage,
  MaterialColor? primarySwatch,
  required Function() onYConfig,
  Function(BuildContext context, Widget? child)? builder,
  ThemeData? theme,
  Function()? onYRan,
}) {
  Deferred_Main.loadLibrary().then(
    (value) async => Deferred_Main.yRunApp(
      launchPage: await onLaunchPage.call(),
      primarySwatch: primarySwatch,
      onYConfig: onYConfig,
      builder: builder,
      theme: theme,
      onYRan: onYRan,
    ),
  );
}