init static method

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

Initializing the library.

Implementation

static void init(
  BuildContext context, {
  Size designSize = defaultSize,
  bool splitScreenMode = false,
  bool minTextAdapt = false,
  FontSizeResolver? fontSizeResolver,
}) {
  final view = View.maybeOf(context);
  return configure(
    data: view != null ? MediaQueryData.fromView(view) : null,
    designSize: designSize,
    splitScreenMode: splitScreenMode,
    minTextAdapt: minTextAdapt,
    fontSizeResolver: fontSizeResolver,
  );
}