Skip to content

Instantly share code, notes, and snippets.

@ramansah
Created December 8, 2018 17:52
Show Gist options
  • Save ramansah/28f6f5c2bb665b53738d7c69f49f48ca to your computer and use it in GitHub Desktop.
Save ramansah/28f6f5c2bb665b53738d7c69f49f48ca to your computer and use it in GitHub Desktop.
class CustomTextContainer extends StatelessWidget {
CustomTextContainer({this.label, this.value});
final String label;
final String value;
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 5),
padding: EdgeInsets.all(20),
decoration: new BoxDecoration(
borderRadius: new BorderRadius.circular(10),
color: Colors.black87,
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
'$value',
style: TextStyle(
color: Colors.white,
fontSize: 54,
fontWeight: FontWeight.bold,
),
),
Text(
'$label',
style: TextStyle(
color: Colors.white70,
),
)
],
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment