defineBackgroundColor method

  1. @override
Color defineBackgroundColor(
  1. BuildContext context
)
override

Implementation

@override
Color defineBackgroundColor(BuildContext context) {
  final theme = Provider.of<ThemeRepository>(context).theme;

  if (outlined) {
    return Colors.transparent;
  }
  if (danger) {
    return style?.dangerBackgroundColor ??
        theme.primaryButtonTheme?.style?.dangerBackgroundColor ??
        SeniorColors.manchesterColorRed500;
  }
  return style?.backgroundColor ??
      theme.primaryButtonTheme?.style?.backgroundColor ??
      SeniorColors.primaryColor600;
}