-
What is a widget?
A widget is a description of the user interface. This description gets “inflated” into an actual view when objects are built. -
What is the starting point of a Dart and Flutter app?
The main() function is the starting point of every Dart and Flutter application. -
How many named constructors can you have in a Dart/Flutter class?
In a Dart/Flutter class, you can have any number of named constructors, but only one unnamed constructor. -
Can you name three EdgeInsets constructors?
In this chapter, we used EdgeInsets.all, EdgeInsets.only, and EdgeInsets.symmetric. -
How can you style the text in a Text widget?
The Text widget has a style property. There you can use TextStyle() to set the font size, its weight, color, and several other properties. -
What is the purpose of the flutter doctor command?
It is a CLI tool that you can use to check the Flutter installation on your system. -
What widget would you use to contain several other widgets, one below the other?
The Column widget contains a children property that places widgets one below the other.
- What is the "arrow syntax"?
The arrow syntax is a concise way to return values in a function. An example of arrow syntax is as follows:
bool convertToBool(int value) => (value == 0) ? false : true;
- Which widget can you use to create space between widgets?
Several widgets can be used for that. A Padding widget can be used to create space between its child and all other widgets on the screen.
- How can you show an image to the user?
You can show images using the Image widget. Image has a network constructor, which automatically downloads an image from a URL with a single line of code.