getEffectiveTheme method

LokotroPayThemeConfig getEffectiveTheme(
  1. Brightness brightness
)

Get effective theme colors based on brightness

Implementation

LokotroPayThemeConfig getEffectiveTheme(Brightness brightness) {
  if (theme == LokotroPayTheme.system) {
    return brightness == Brightness.dark
        ? LokotroPayThemeConfig.dark(
            primaryColor: primaryColor,
            secondaryColor: secondaryColor,
            tertiaryColor: tertiaryColor,
            borderRadius: borderRadius,
          )
        : LokotroPayThemeConfig.light(
            primaryColor: primaryColor,
            secondaryColor: secondaryColor,
            tertiaryColor: tertiaryColor,
            borderRadius: borderRadius,
          );
  }
  return this;
}