init static method

void init(
  1. BuildContext context, {
  2. Size designSize = defaultSize,
})

Implementation

static void init(
  BuildContext context, {
  Size designSize = defaultSize,
}) {
  _instance ??= FontResponsiveness._();
  _instance!..uiSize = designSize;

  MediaQueryData mediaQuery = MediaQuery.of(context);

  _screenWidth = mediaQuery.size.width;
}