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

A

onChanged

19
Q

receives what the user types

A

String

20
Q

appears above on TextField

A

labelText

21
Q

Light ghost inside TextField

A

hintText

22
Q

Error message that appears below, usually red

A

errorText

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
Q

Draws an icon to the left of the entire TextField

A

icon

26
Q

Draws one inside the TextField to the left

A

prefixIcon

27
Q

Same as prefixIcon but to the far right

A

suffixIcon

28
Q

make it true to make password box

A

obscureText property

29
Q

forbids characters from being entered

A

BlackListinngInputTextFormatter

30
Q

allows onlu these characters to be entered

A

WhiteListinngInputTextFormatter

31
Q

can’t type more than x characters

A

LengthListinngInputTextFormatter

32
Q

select one, others are not selected

A

Radio Button

33
Q
  • handy affordance when user picks a numeric value within upper and lower limit
  • min 0.0
  • max 1.0
A

slider

Slider(
label: value.toString(),
min: 0, max: 100
divisions: 100
value: _value,
onChanged: (double val) => _value = val
)

34
Q

great for picking one of small number of things

A

dropdown

DropdownMenuItem<SearchType>
( child: Text('Image'),
value: SearchType.image</SearchType>

35
Q

only purpose is to wrap all of its inputs thereby grouping them and their data

A

key

36
Q
  • BOOL
  • true means it will run as many field changes
  • false means it will run manually
A

autovalidate

37
Q

three key currentState property

A
  1. save()
  2. validate()
  3. reset()
38
Q

save all fields inside the form by calling onSaved

A

saved()

39
Q

run each field’s validator function

A

validate()

40
Q

reset each field inside the form back to initialValue

A

reset()

41
Q

entire purpose is to save, reset, validate event handlers to an inner widget

A

FormField Widget

42
Q

wrap FormField widget around each input widget

A

builder

43
Q

Form has a key which has a currentState which has a saved() method

A

onSaved
key.currentState.save();

44
Q

if autovalidate is true, flutter will validate immediately as user make changes

A

validate
key.currentState.validate();