generateThemeByIntColor static method

UpThemeData generateThemeByIntColor({
  1. required int primaryColor,
  2. required int baseColor,
  3. bool isDark = false,
  4. int? secondaryColor,
  5. int? tertiaryColor,
  6. int? warnColor,
  7. int? linkColor,
  8. int? successColor,
})

Implementation

static UpThemeData generateThemeByIntColor({
  required int primaryColor,
  required int baseColor,
  bool isDark = false,
  int? secondaryColor,
  int? tertiaryColor,
  int? warnColor,
  int? linkColor,
  int? successColor,
}) {
  return generateThemeByMaterial(
    baseColor: isDark
        ? generateLighterMaterialColor(Color(baseColor))
        : generateDarkerMaterialColor(Color(baseColor)),
    primaryColor: generateMaterialFromSingleColor(Color(primaryColor)),
    secondaryColor: secondaryColor != null
        ? generateMaterialFromSingleColor(Color(secondaryColor))
        : null,
    tertiaryColor: tertiaryColor != null
        ? generateMaterialFromSingleColor(Color(tertiaryColor))
        : null,
    warnColor: warnColor != null
        ? generateMaterialFromSingleColor(Color(warnColor))
        : null,
    linkColor: linkColor != null
        ? generateMaterialFromSingleColor(Color(linkColor))
        : null,
    successColor: successColor != null
        ? generateMaterialFromSingleColor(Color(successColor))
        : null,
  );
}