CPAD Quizzes

¡Supera tus tareas y exámenes ahora con Quizwiz!

Which widget class will you use to make one widget to fade out while making another widget to fade in at the same location?

AnimatedCrossFade

To drag and drop a widget, you use two widget classes: (a) Draggable that can be fragged from and (b) ________ that can receive data when a Draggable is dropped.

DragTarget

The ________ widget causes its child to fill all available space. It is commonly used as a child of widgets like Row and Column.

Expanded

In Dart, two declarations "dynamic x;" and "Object x;" are equivalent, as everything is an object.

False

In Dart, you cannot define a function inside a function.

False

Choosing a date or time in an app is a common activity, so Flutter provides functions for that, such as showDatePicker() and showTimePicker(). The return type of the showDatePicker() function is _____________

Future

Which of the following statements about the Navigator widget is incorrect?

It provides a visual user interface to move from one screen to another.

Which of the following descriptions of the Transform widget is incorrect?

It provides an animation to a child widget

The SnackBar widget shows a lightweight message with an optional action which is briefly displayed at the bottom of the screen. To display a snack bar, you use ____________.of(content).showSnackbar() method.

Scaffold

In the "scoped model" state management approach, you need to define and use three different classes: Model, ScopedModel, _____________.

ScopedModelDescendant

Which dialog will you use to offer a choice between several options?

SimpleDialog(Cupertino Dialog)

The ____________ widget is a type of container that introduces some slide functionality. In many mobile apps, where there is a list of items, you can slide them left and/or right to reveal buttons for various functions. That's exactly what this widget does.

Slidable

The _________ widget is used to select a value from a range of continuous or a discrete set of values. It displays a line and a little handle called a thumb that the user can drag to select a value from a predefined range of values.

Slider

A TextFormField widget is a FormField widget that contains a ________ widget and provides form-related properties and functionality. It lets the user enter text, either with hardware keyboard or with an onscreen keyboard.

TextField

The Dart exception handling is similar to that of Java. Which of the following statement is an incorrect description?

The "catch" clause is always required

All references to fields are invocations of special access methods called getters and setters.

True

Flutter doesn't provide a standard approach for implementing a global state, a state shared by multiple (unrelated) widgets or needed beyond the lifetime of a single widget.

True

In Dart, everything (data) is an object, and every object is an instance of a class.

True

Which of the following statements about DartPad is incorrect?

You need to install the Dart SDK to use it.

Consider a statement: z = p..x = 10..y=20..x. assume p is not null before the execution of the statement. Which of the following statements about the state after the execution of the statement is correct?

z is p and p.x is 10

Dart supports two forms of so-called documentation (or doc) comments: single-line comments starting with _________ and multi-line comments enclosed in /** and */.

///

If the values of x and y are 10 and 20 respectively, what is the value of an expression x ?? y?

10

The _______ widget serves a similar purpose to the Center widget but has more flexibility in that it's not just for centering content. It aligns its child within itself (property:aligned) and can also optionally size itself based on the child's size (properties: widthFactor and heightFactor).

Align

Which of the following statements about the MaterialApp widget is incorrect?

All Flutter apps must start with it, i.e., have it as the top-level widget.

The ________ widget has a single child, and centers its child within itself.

Center

A __________ widget is a small visual element that is typically meant to display an attribute, text, entity, or action. It is commonly used to show a small element representing the current user.

Chip

The __________ widget is, along with Row and Column, probably one of the most-used widgets that Flutter offers for laying out your UI. It is a bit of a jack-of-all-trades in that it combines what a number of other widgets provide into sleek package - painting, positioning, and sizing widgets.

Container

Flutter consists of four main parts: (a) _______ platform, the language of Flutter, (b) Flutter engine responsible for rendering the UI, (c) foundation library for interfacing over the native SDKs, and (d) widgets, building blocks of Flutter UIs.

Dart

The ____________ widget is an element that the user can get rid of by flinging it in a given direction. It is removed from the view once it is completely swiped away.

Dismissible

Dart supports multiple inheritance in that a class may have more than one direct superclass.

False

The ________ widget is a convenience widget to group multiple input widgets and manage them together. It wraps all their inputs and provides common functionality such as saving, resetting, and validating.

Form

The ________ widget class detects gestures ~ i.e., responds to various touch events ~ such as tap events.

GestureDetector

A __________ is a key that is unique across the entire app. This usually comes into play as the value of the key property of a widget, which determines how a widget replaces another in a widget tree when the widget is rebuilt.

GlobalKey

It is common to show the user a list of data in some forms, and there are handful of widget specifically designed for that purpose. Which of the following widget will you use to show thumbnails for a collection of pictures.

GridView

________ lets you quickly and easily experiment, build UIs and fix bugs by injecting update code into the running Dart Virtual Machine (VM). It works only in debug mode, in which your app is actually running in a Dart VM rather than having been compiled to native ARM code.

Hot reload

A tab layout is widely used in mobile apps to organize multiple sections of a screen or page to create a tab layout, you use all the following widgets/classes except for:

IndexedStack

A tab layout is widely used in mobile apps to organize multiple sections of a screen or page, e.g., one for each type of entities in the FLutterBook app. To create a tab layout, you use all the following widgets/classes except for:

IndexedStack

This widget shows a single child from a list of children. The displayed child is the one with the given index. The widget is always as big as the largest child.

IndexedStack

Which of the following statements about the Checkbox widget is incorrect?

It can display only two values: true (checked) and false (unchecked)

Consider an expression: shape is a Circle. Which of the following statements is correct?

It evaluates to true only if shape is an instance of a class that implements the interface of Circle.

Consider an instance variable declared as "int x;". Which of the following statements is incorrect?

It is a private field in that it is invisible outside the declared class.

Consider a constructor declared as "Person(this.name);". Which of the following statements is correct?

It is equivalent to "Person(name):this.name = name;".

There are several ways to make data persistent in Flutter apps. Which approach does the FlutterBook use?

Local database system (SQLite)

In Dart, there are two kinds of formal parameters for functions: positional and names parameters. Which of the following descriptions is incorrect?

The named parameters can be used with positional optional parameters.

The _______ widget provides a text label that helps explain the function of a button or other use interface action. For example, you can wrap a button in this widget to show a label when the widget is long pressed.

Tooltip

A Flutter UI is built from code. That is, there is no separate markup language (e.g., XML) to define a Flutter UI.

True

A Navigator.push() call returns a Future that awaits a value which is to be passed back by the new route.

True

Consider a class, say C, with a member declared as "get x;". You must declare C as an abstract class using the "abstract" keyword.

True

Flutter provides two sets of design-specific widgets: Material design widgets (Android) and Cupertino design widgets (iOS).

True

Flutter renders its own UI components called widgets. That is, unlike most other frameworks, Flutter does not use native platform UI components.

True

In Dart, a function is a first-class citizen in that it can be stored in a variable, passed as an argument to another function, and returned as the result of a function.

True

In Dart, every class implicitly defines an interface that describes what methods are available on its instances. There is no explicit interface declaration syntax.

True

In Dart, null is an object.

True

In Flutter, a graphical icon widget is drawn with a glyph from a font, not from an image, and a huge number of material design icons are provided by the Icons class.

True

It doesn't matter if you're developing for iOS, you can still use the MaterialApp widget as the top-level widget.

True

The Image widget class can display an image, embedded in the app (bundled and deployed with an app and accessible at runtime) or fetched live from Internet.

True

The main purpose of the FormField widget is to wrap an (input) widget to provide save, reset, and validate event handlers and this to make the widget work with a form.

True

To specify the theme for an entire application, you either use the theme property of a MaterialApp widget or wrap the entire app's widget tree in a Theme widget.

True

While most functions have a name, they don't have to; they can also be anonymous and be defined inline as part of an expression.

True

A(n) _______ function returns immediately before it completes the execution of its body, and its return type is always Future.

async

To call a function that returns a Future object, you may use the __________ keyword to suspend the caller until the called function completes its execution and the result becomes available.

await

The __________ provides a bar at the bottom of the screen with icons and/or text that a user can click to move between part of an app. However, it doesn't really do navigation itself; it must be done in your code, or widget can be used for other purposes.

bottomNavigationBar

In Flutter, almost everything is a widget, and every widget must define (override) the ________ (BuildContext context) method.

build

All the following type names are legal in Dart except for:

char

The Row widget displays its children in a horizontal array. The __________ property specifies the array of child widgets to be displayed.

children

The Column widget displays its children in a vertical array. If you want to align its children horizontally, you use this property that has values such as start, center, and end.

crossAxisAlignment

If a stateful widget has a key associated with it, you can refer to its current state through the ________ property of its key.

currentState

Flutter SDK provides several tools, or commands. One command that you will execute from the command line to set up and configure a Flutter development environment is flutter ____________; it is also available from Tools > Flutter menu from Android Studio is configured for Flutter. It runs through a series of checks and configuration steps to get you up and running.

doctor

Consider a Dart variable declaration statement: "var x = 10.0;". The type of variable x is _________.

double

If you want to assign values of different types to a variable x, which variable declaration style works and is preferred?

dynamic x;

In Dart, there is no difference between "final" and "const" variable, e.g., "final x = 100;" and "const x = 100;".

false

The Radio widget is used to select a single value among a family of mutually exclusive values. Multiple widgets are grouped to form a family by setting the __________ property of each widget to the same local variable.

groupValue

In Dart, you can override many operator such as +, -, and ==. the only catch is that if you override the == operator, then you should also override the class's _______ getter.

hashCode

A ListTile widget is a single fixed-height row that typically contains some text and icons. Which of the following is not an element (or property) of the ListTile widget class?

heading

To test whether an object conforms to an interface, or type, at runtime -- i.e., whether an object is an instance of a class that implements an interface -- you use the _______ operator which is similar to Java's instance of operator.

is

A Flutter project consists of several top-level directory. Which directory contains the application code written in Dart?

lib

A _______ is a class for use by other classes without having to be the parent class. It allows composition of classes at the source code level. You may compose multiple of these using the "with" keyword.

mixin

A list in Dart uses a 0-based indexing scheme, and you can access an element of a list by index, e.g., myList[1]. The last index of a list, say myList, is _______; write a Dart express that give the last index of myList.

myList.length-1

In the scoped model approach, you use the __________() framework method from the Model class to notify changes to all descendant widgets.

notifyListeners

The initial value of a variable x declared as "int x;" is _________.

null

The Theme.___________ (Build Context context) static method find the closest Theme instance that encloses the given context. It is used to get the current theme, or parent theme, in a descendant widget in the widget tree.

of

The Text widget displays a string of text in a single style. Its ______ property is interesting in that it tells Flutter what to do when the text overflows the bounds of its container; allowed values are TextOverflow.clip, TextOverflow.ellipsis, TextOverflow.fade, and TextOverflow.visible.

overflow

There are two types of animations possible in Flutter: (a) tween animation that has a defined start and finish and (b) ________ animation that relies on user interaction.

physics-based

Navigating to routes is done by calling variations of Navigator.push() and Navigator_______() methods.

pop

The SnackBar widget shows a lightweight message with an optional action which is briefly displayed at the bottom of the screen. To display a snack bar, you use _________of(context).showSnackBar() method.

scaffold

The BottomSheet widget is a widget displated at the bottom of the screen to show additional content to the user and/or ask for a choice. It's sort of a cross between SimpleDialog and SnackBar. To show it, you use the ________() function.

showBottomSheet

In Flutter, there are two type of widgets: stateless widgets and _________ widgets. The second type of the widgets are automatically re-built and re-rendered by Flutter when their states change.

stateful

For each screen of your app, you use a scaffolding widget that implements the basic layout structure of a screen. The Scaffold widget takes care of many common app UI elements for you, and provides a number of properties for this, including all the following except for:

title

The TextFormField widget provides many properties such as keyboardType, declaration, and oscureText. For example, the declaration property (of type InputDeclaration) is commonly used to define a hint text and a label text. The _______ property is for defining a function that will perform validation on the entered text.

validator

A Flutter UI is built by composing widgets, resulting in a structure called a __________. This structure represents how the UI widgets are organized.

widget tree


Conjuntos de estudio relacionados

Chapter 7-2 Jewish Beliefs and Texts

View Set

Physics Chapter 4 Review Questions

View Set

incentive stock options (ISOs) non qualified stock options (NQSOs)

View Set

Antonomia y fisiologia genera Chp. 6 (milady)

View Set