ThemeApp constructor

ThemeApp(
  1. ThemeModel themeModel
)

Implementation

ThemeApp(this.themeModel) {
  primaryColor=Color(int.parse("0xff${themeModel.primaryColor}"));
  onPrimaryColor=Color(int.parse("0xff${themeModel.onPrimaryColor}"));
  secondaryColor=Color(int.parse("0xff${themeModel.secondaryColor}"));
  errorColor=Color(int.parse("0xff${themeModel.errorColor}"));
  borderColor=Color(int.parse("0xff${themeModel.borderColor}"));
  buttonTextStyle= TextStyle(
    fontWeight: themeModel.buttonTextStyle.fontWeight == "bold"
        ? FontWeight.bold
        : themeModel.buttonTextStyle.fontWeight == "w400"
        ? FontWeight.w400
        : FontWeight.w500,
    fontSize: themeModel.buttonTextStyle.fontSize,
    color:
    Color(int.parse("0xff${themeModel.buttonTextStyle.color}")),
  );
  headline1= TextStyle(
    fontWeight: themeModel.headline1.fontWeight == "bold"
        ? FontWeight.bold
        : themeModel.headline1.fontWeight == "w400"
        ? FontWeight.w400
        : FontWeight.w500,
    fontSize: themeModel.headline1.fontSize,
    color:
    Color(int.parse("0xff${themeModel.headline1.color}")),
  );
  headline2= TextStyle(
    fontWeight: themeModel.headline2.fontWeight == "bold"
        ? FontWeight.bold
        : themeModel.headline2.fontWeight == "w400"
        ? FontWeight.w400
        : FontWeight.w500,
    fontSize: themeModel.headline2.fontSize,
    color:
    Color(int.parse("0xff${themeModel.headline2.color}")),
  );
  hintStyle= TextStyle(
    fontWeight: themeModel.hintStyle.fontWeight == "bold"
        ? FontWeight.bold
        : themeModel.hintStyle.fontWeight == "w400"
        ? FontWeight.w400
        : FontWeight.w500,
    fontSize: themeModel.hintStyle.fontSize,
    color:
    Color(int.parse("0xff${themeModel.hintStyle.color}")),
  );
}