Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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