Skip to content

Instantly share code, notes, and snippets.

@gabrielaraujoz
Created June 3, 2021 19:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save gabrielaraujoz/c8b918ad51af91bb29f92b0538ccebea to your computer and use it in GitHub Desktop.
revelobadgestyle
class ReveloBadgeStyle extends Equatable {
final Color backgroundColor;
final Color textColor;
final Border border;
const ReveloBadgeStyle._({
@required this.backgroundColor,
@required this.textColor,
this.border,
});
@override
List<Object> get props => [backgroundColor, textColor, border];
factory ReveloBadgeStyle.red() => ReveloBadgeStyle._(
backgroundColor: ReveloColors.red,
textColor: ReveloColors.white,
);
factory ReveloBadgeStyle.blue() => ReveloBadgeStyle._(
backgroundColor: ReveloColors.blueLight,
textColor: ReveloColors.white,
);
factory ReveloBadgeStyle.blueLight() => ReveloBadgeStyle._(
backgroundColor: ReveloColors.blueLight,
textColor: ReveloColors.white,
);
factory ReveloBadgeStyle.green() => ReveloBadgeStyle._(
backgroundColor: ReveloColors.green,
textColor: ReveloColors.white,
);
factory ReveloBadgeStyle.gray() => ReveloBadgeStyle._(
backgroundColor: ReveloColors.gray,
textColor: ReveloColors.white,
);
factory ReveloBadgeStyle.outlined(BuildContext context) => ReveloBadgeStyle._(
backgroundColor: ReveloColors.whiteTransparent,
textColor: ReveloTheme.of(context).highEmphasisColor,
border: Border.all(color: ReveloTheme.of(context).chipOutlineColor),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment