0
0
Fluttermobile~5 mins

Text widget and styling in Flutter - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the Text widget in Flutter?
The Text widget displays a string of text with single style in the app's UI. It is used to show readable content to users.
Click to reveal answer
beginner
How do you change the color of text in a Text widget?
You change the text color by using the style property with a TextStyle object, setting its color property, e.g., Text('Hello', style: TextStyle(color: Colors.red)).
Click to reveal answer
beginner
What property of TextStyle controls the font size?
The fontSize property controls the size of the text font, for example: TextStyle(fontSize: 20) makes the text larger.
Click to reveal answer
beginner
How can you make text bold using the Text widget?
Use the fontWeight property inside TextStyle and set it to FontWeight.bold, like Text('Bold', style: TextStyle(fontWeight: FontWeight.bold)).
Click to reveal answer
beginner
What does the textAlign property do in a Text widget?
The textAlign property controls how the text is aligned horizontally within its container, such as TextAlign.left, TextAlign.center, or TextAlign.right.
Click to reveal answer
Which property is used to change the font size of a Text widget?
Acolor
BfontWeight
CtextAlign
DfontSize
How do you make text italic in Flutter?
Astyle: TextStyle(fontStyle: FontStyle.italic)
Bstyle: TextStyle(fontWeight: FontWeight.italic)
CtextAlign: TextAlign.italic
Dcolor: Colors.italic
What does the textAlign property affect?
AFont size
BHorizontal alignment of text
CText color
DText decoration
Which widget is used to display text in Flutter?
AText
BContainer
CRow
DColumn
How do you change the color of text to blue?
Acolor: Colors.blue
BtextColor: Colors.blue
Cstyle: TextStyle(color: Colors.blue)
DfontColor: Colors.blue
Explain how to style text in Flutter using the Text widget and TextStyle.
Think about how you change color, size, weight, and alignment.
You got /7 concepts.
    Describe the role of the textAlign property and give examples of its values.
    Consider how text looks inside a box when aligned differently.
    You got /5 concepts.