generateThemeByIntColor static method
UpThemeData
generateThemeByIntColor(
{ - required int primaryColor,
- required int baseColor,
- bool isDark = false,
- int? secondaryColor,
- int? tertiaryColor,
- int? warnColor,
- int? linkColor,
- 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,
);
}