generateThemeByIntColor static method

UpThemeData generateThemeByIntColor({
  1. required int primaryColor,
  2. int? secondaryColor,
  3. int? tertiaryColor,
  4. int? warnColor,
  5. int? linkColor,
  6. int? successColor,
})

Implementation

static UpThemeData generateThemeByIntColor({
  required int primaryColor,
  int? secondaryColor,
  int? tertiaryColor,
  int? warnColor,
  int? linkColor,
  int? successColor,
}) {
  return generateThemeByMaterial(
    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,
  );
}