Last active
August 16, 2020 10:35
-
-
Save stephaniefash/0b2848b19500f9f75c0c38f25c470381 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 _MyHomePageState extends State<MyHomePage> { | |
String playerName = "Serena"; | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
backgroundColor: Colors.black, | |
appBar: AppBar( | |
title: Text(widget.title), | |
), | |
body: Center( | |
child: Text.rich( | |
TextSpan(text: "It is ", children: <TextSpan>[ | |
TextSpan( | |
text: "$playerName's ", | |
style: TextStyle( | |
color: Colors.redAccent, // <- override the color | |
fontSize: 100, // <- override the font size | |
fontWeight: FontWeight.bold, // <- override the font weight | |
)), | |
TextSpan(text: "turn to serve.") | |
]), | |
style: TextStyle( | |
fontWeight: FontWeight.w100, | |
fontSize: 30, | |
fontFamily: 'Roboto', | |
color: Colors.white), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment