generateThemeByColor static method

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

Implementation

static UpThemeData generateThemeByColor({
  required Color primaryColor,
  Color? secondaryColor,
  Color? tertiaryColor,
  Color? warnColor,
  Color? linkColor,
  Color? successColor,
}) {
  return generateThemeByMaterial(
    primaryColor: generateMaterialFromSingleColor(primaryColor),
    secondaryColor: secondaryColor != null
        ? generateMaterialFromSingleColor(secondaryColor)
        : null,
    tertiaryColor: tertiaryColor != null
        ? generateMaterialFromSingleColor(tertiaryColor)
        : null,
    warnColor:
        warnColor != null ? generateMaterialFromSingleColor(warnColor) : null,
    linkColor:
        linkColor != null ? generateMaterialFromSingleColor(linkColor) : null,
    successColor: successColor != null
        ? generateMaterialFromSingleColor(successColor)
        : null,
  );
}