UNIT 4 Flashcards

1
Q

components that make up a flutter application

A

widgets

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

when part of user interface u are describing does not depend on anything other than configuration

A

stateless

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

data within the widget that can change during its lifetime

A

state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

widget’s value needs to be updated by typing into textfield

A

stateful widget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

every widget build method which receives a BuildContext and returns a single Flutter Widget

A

widget build function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

display string to the screen

A

text widget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • flutter comes with built-in set of icons

Icon(
Icons.cake,
color: Colors.red,
size: 200,
)

A

icon widget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

display image on flutter

A

image widget

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

put image in project file folder and edit in pubspec.yam

Image.asset(‘ ‘)

A

embedded images

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

image fetched from internet via HTTP

A

Network Image
Image.network(‘URL’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

flutter layout engine will shrink image in a container but not grow in it

A

BoxFit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

image is stretched in both height and width exactly; distort image

A

fill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

shrink or grow until space is filled but image is cropped

A

cover

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

make height fit exactly; add extrea width space

A

fitHeight

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

make width fit exactly; clip height or add extra space

A

fitWidth

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

shrink both height and width to fit; add space on both

A

contain

fit: BoxtFit.contain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

textfield syntax

A

TextField(
OnChanged: (String val) => searchTerm = val

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

event handler that fires after every keystroke

19
Q

receives what the user types

20
Q

appears above on TextField

21
Q

Light ghost inside TextField

22
Q

Error message that appears below, usually red

23
Q

Text in the TextField to the left of the stuff the user types in

A

prefixText

24
Q

Same as prefixText but to the far right

A

suffixTexT

25
Draws an icon to the left of the entire TextField
icon
26
Draws one inside the TextField to the left
prefixIcon
27
Same as prefixIcon but to the far right
suffixIcon
28
make it true to make password box
obscureText property
29
forbids characters from being entered
BlackListinngInputTextFormatter
30
allows onlu these characters to be entered
WhiteListinngInputTextFormatter
31
can't type more than x characters
LengthListinngInputTextFormatter
32
select one, others are not selected
Radio Button
33
* handy affordance when user picks a numeric value within upper and lower limit * min 0.0 * max 1.0
slider Slider( label: value.toString(), min: 0, max: 100 divisions: 100 value: _value, onChanged: (double val) => _value = val )
34
great for picking one of small number of things
dropdown DropdownMenuItem ( child: Text('Image'), value: SearchType.image
35
only purpose is to wrap all of its inputs thereby grouping them and their data
key
36
* BOOL * true means it will run as many field changes * false means it will run manually
autovalidate
37
three key currentState property
1. save() 2. validate() 3. reset()
38
save all fields inside the form by calling onSaved
saved()
39
run each field's validator function
validate()
40
reset each field inside the form back to initialValue
reset()
41
entire purpose is to save, reset, validate event handlers to an inner widget
FormField Widget
42
wrap FormField widget around each input widget
builder
43
Form has a key which has a currentState which has a saved() method
onSaved key.currentState.save();
44
if autovalidate is true, flutter will validate immediately as user make changes
validate key.currentState.validate();