Skip to content

Instantly share code, notes, and snippets.

@enginebai
Created June 22, 2021 12:53
Show Gist options
  • Save enginebai/89dbc0639f0a55d23376f3865412bd54 to your computer and use it in GitHub Desktop.
Save enginebai/89dbc0639f0a55d23376f3865412bd54 to your computer and use it in GitHub Desktop.
@override
Widget build(BuildContext context) {
return Container(
height: _labelHeight,
decoration: BoxDecoration(
border: Border.all(
color: this.strokeColor ?? Colors.transparent,
width: strokeWidth),
borderRadius: BorderRadius.circular(_cornerSize),
color: this.backgroundColor ?? Colors.transparent),
padding: EdgeInsets.symmetric(horizontal: 8),
child: Center(
child: Text(this.labelText,
style: Theme.of(context)
.textTheme
.caption
?.copyWith(color: this.textColor ?? Colors.black)),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment