refresh static method

void refresh()

Implementation

static void refresh() {
  if (!SizeConfig().isReady) {
    return;
  }

  //regular textstyles
  fontR20light = TextStyle(
    fontSize: 20.0.toFont,
    color: ColorConstants.light,
    fontWeight: FontWeight.normal,
  );
  fontR18light = TextStyle(
    fontSize: 18.toFont,
    color: ColorConstants.light,
    fontWeight: FontWeight.normal,
  );
  fontR16light = TextStyle(
    fontSize: 16.toFont,
    color: ColorConstants.light,
    fontWeight: FontWeight.normal,
  );
  fontR14light = TextStyle(
    fontSize: 14.toFont,
    color: ColorConstants.light,
    fontWeight: FontWeight.normal,
  );

  //medium textstyles
  fontM20light = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.w500);
  fontM18light = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.w500);
  fontM16light = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.w500);
  fontM14light = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.w500);

  //bold TextStyles
  fontBold20light = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.bold);
  fontBold18light = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.bold);
  fontBold16light = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.bold);
  fontBold14light = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.light,
      fontWeight: FontWeight.bold);

  //regular textstyles
  fontR20dark = TextStyle(
    fontSize: 20.0.toFont,
    color: ColorConstants.dark,
    fontWeight: FontWeight.normal,
  );
  fontR18dark = TextStyle(
    fontSize: 18.toFont,
    color: ColorConstants.dark,
    fontWeight: FontWeight.normal,
  );
  fontR16dark = TextStyle(
    fontSize: 16.toFont,
    color: ColorConstants.dark,
    fontWeight: FontWeight.normal,
  );
  fontR14dark = TextStyle(
    fontSize: 14.toFont,
    color: ColorConstants.dark,
    fontWeight: FontWeight.normal,
  );

  //medium textstyles
  fontM20dark = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.w500);
  fontM18dark = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.w500);
  fontM16dark = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.w500);
  fontM14dark = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.w500);

  //bold TextStyles
  fontBold20dark = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.bold);
  fontBold18dark = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.bold);
  fontBold16dark = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.bold);
  fontBold14dark = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.dark,
      fontWeight: FontWeight.bold);

  //regular textstyles
  fontR20primary = TextStyle(
    fontSize: 20.0.toFont,
    color: ColorConstants.primary,
    fontWeight: FontWeight.normal,
  );
  fontR18primary = TextStyle(
    fontSize: 18.toFont,
    color: ColorConstants.primary,
    fontWeight: FontWeight.normal,
  );
  fontR16primary = TextStyle(
    fontSize: 16.toFont,
    color: ColorConstants.primary,
    fontWeight: FontWeight.normal,
  );
  fontR14primary = TextStyle(
    fontSize: 14.toFont,
    color: ColorConstants.primary,
    fontWeight: FontWeight.normal,
  );

  //medium textstyles
  fontM20primary = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.w500);
  fontM18primary = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.w500);
  fontM16primary = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.w500);
  fontM14primary = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.w500);

  //bold TextStyles
  fontBold20primary = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.bold);
  fontBold18primary = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.bold);
  fontBold16primary = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.bold);
  fontBold14primary = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.primary,
      fontWeight: FontWeight.bold);

  //regular textstyles
  fontR20secondary = TextStyle(
    fontSize: 20.0.toFont,
    color: ColorConstants.secondary,
    fontWeight: FontWeight.normal,
  );
  fontR18secondary = TextStyle(
    fontSize: 18.toFont,
    color: ColorConstants.secondary,
    fontWeight: FontWeight.normal,
  );
  fontR16secondary = TextStyle(
    fontSize: 16.toFont,
    color: ColorConstants.secondary,
    fontWeight: FontWeight.normal,
  );
  fontR14secondary = TextStyle(
    fontSize: 14.toFont,
    color: ColorConstants.secondary,
    fontWeight: FontWeight.normal,
  );

  //medium textstyles
  fontM20secondary = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.w500);
  fontM18secondary = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.w500);
  fontM16secondary = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.w500);
  fontM14secondary = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.w500);

  //bold TextStyles
  fontBold20secondary = TextStyle(
      fontSize: 20.0.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.bold);
  fontBold18secondary = TextStyle(
      fontSize: 18.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.bold);
  fontBold16secondary = TextStyle(
      fontSize: 16.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.bold);
  fontBold14secondary = TextStyle(
      fontSize: 14.toFont,
      color: ColorConstants.secondary,
      fontWeight: FontWeight.bold);
}