Skip to content

Instantly share code, notes, and snippets.

@stephaniefash
Last active August 16, 2020 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephaniefash/0b2848b19500f9f75c0c38f25c470381 to your computer and use it in GitHub Desktop.
Save stephaniefash/0b2848b19500f9f75c0c38f25c470381 to your computer and use it in GitHub Desktop.
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