ensureScreenSizeAndInit static method

Future<void> ensureScreenSizeAndInit(
  1. BuildContext context, {
  2. Size designSize = defaultSize,
  3. bool splitScreenMode = false,
  4. bool minTextAdapt = false,
  5. FontSizeResolver? fontSizeResolver,
})

Implementation

static Future<void> ensureScreenSizeAndInit(
  BuildContext context, {
  Size designSize = defaultSize,
  bool splitScreenMode = false,
  bool minTextAdapt = false,
  FontSizeResolver? fontSizeResolver,
}) {
  return ScreenUtil.ensureScreenSize().then((_) {
    return init(
      context,
      designSize: designSize,
      minTextAdapt: minTextAdapt,
      splitScreenMode: splitScreenMode,
      fontSizeResolver: fontSizeResolver,
    );
  });
}