Created
December 8, 2018 17:52
-
-
Save ramansah/28f6f5c2bb665b53738d7c69f49f48ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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