Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
oldrevelobadge
class ReveloBadge extends StatelessWidget {
final String text;
final Color backgroundColor;
final Color textColor;
const ReveloBadge({
Key key,
@required this.text,
@required this.backgroundColor,
this.textColor,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: backgroundColor,
borderRadius: BorderRadius.circular(4),
),
child: Text(
text.toUpperCase(),
style: ReveloTheme.of(context).overline.copyWith(
color: textColor ?? ReveloColors.white,
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment