NEW
Font size
WorksheetsCSCC 106 Application Development Quiz 3
Total questions: 70
Worksheet time: 35mins
Flutter was developed by which company and released in what year?
Microsoft, 2018
Facebook, 2016
Apple, 2015
Google, 2017
What programming language is primarily used to develop Flutter applications?
Swift
Java
Kotlin
Dart
Which function serves as the entry point of a Flutter application?
runApp()
start()
build()
main()
Flutter source code files commonly use which file extension?
.dart
.kt
.java
.flutter
Which terminal command is used to add Flutter dependencies automatically?
dart pub install
flutter install
flutter pub get
flutter get
What do you call functions that are defined inside a class?
Widgets
Packages
Methods
Variables
Which keyword is used in Dart when the data type of a variable is uncertain?
dynamic
var
final
const
Which statement correctly imports the Material library in Flutter?
require material.dart;
include material.dart;
import 'package:flutter/material.dart';
import 'flutter/material.dart';
What symbol is used as a prefix to make a variable private in Dart?
$
@
#
_ (underscore)
Which annotation is used to override a method from a parent class?
@override
@overrideMethod
@extends
@inherit
An immutable class is best described as a class that:
Has no constructor
Cannot be modified after creation
Can be changed at any time
Contains no methods
A mutable class is best described as a class that:
Cannot be changed
Extends StatelessWidget
Has no properties
Can be modified after creation
Which keyword is used to extend a StatelessWidget or StatefulWidget?
inherit
extends
implement
with
Which keyword is used to define a class in Dart?
new
define
object
class
Which built-in method is responsible for building the widget tree?
constructor()
dispose()
build()
initState()
A widget containing the word “Button” usually requires which property to function?
text
color
child
onPressed
Which of the following are common named parameters used in widget constructors?
var, final
child, children, onPressed
main, build
static, dynamic
In Flutter programming, everything is considered a:
Object
Function
Widget
Class
If a widget property starts with the prefix “on,” the value should be a:
Function (callback)
String
Boolean
Widget
A Flutter widget must always have a matching pair of:
Quotes
Brackets
Semicolons
Parentheses
A widget property must always be followed by which symbol?
.
;
=
:
Which widget is designed for the vertical alignment of child widgets?
Column
Row
Stack
Expanded
Which widget is designed for the horizontal alignment of child widgets?
Wrap
Row
Column
ListView
What is the official online repository for Flutter and Dart packages?
Stack Overflow
Firebase
pub.dev
GitHub
Which file is used to configure Flutter project dependencies manually?
config.yaml
pubspec.yaml
main.dart
build.gradle
Which framework is a cross-platform UI toolkit developed by Google?
Ionic
Flutter
React Native
Xamarin
A parameter list in Dart is enclosed by which symbols?
[ ]
{ }
( )
Which terminal command cleans a Flutter project?
flutter reset
flutter clean
flutter remove
flutter clear
Which command runs a Flutter app in the Chrome browser?
flutter run web
flutter build chrome
flutter chrome
flutter run -d chrome
Which terminal command downloads all required Flutter dependencies?
flutter pub get
dart pub clean
flutter fetch
flutter install
Which command is used to add the sqflite dependency?
flutter pub add sqflite
dart pub add sqflite
flutter install sqflite
flutter add sqflite
Which syntax correctly navigates to the Dashboard screen?
Navigator.go(Dashboard);
Navigator.push(Dashboard());
Navigator.push(context, MaterialPageRoute(builder: (_) => Dashboard()));
Navigator.route(Dashboard);
In Dart, every statement must end with which symbol?
;
:
.
,
Given the list below, which statement prints “Doe”? var data = [ {'id': 1, 'name': 'John'}, {'id': 2, 'name': 'Jane'}, {'id': 13, 'name': 'Doe'} ];
print(data[2]['name']);
print(data.name);
print(data['Doe']);
print(data.name[2]);
Which syntax correctly sets the font weight of a Text widget to bold?
Text("Hi", bold: true)
Text.bold("Hi")
Text("Hi", style: TextStyle(fontWeight: FontWeight.bold))
Text("Hi", style: FontWeight.bold)
What is the proper naming convention for variables in Dart?
PascalCase
camelCase
snake_case
kebab-case
What is the proper naming convention for class names in Dart?
snake_case
PascalCase
kebab-case
camelCase
Which syntax is used to access a method outside its class?
method.ClassName()
ClassName->method()
method(ClassName)
ClassName.method()
When retrieving a specific record from an SQLite table, which clause is used?
UPDATE
SELECT
WHERE
INSERT
What is the root widget of a Material Design Flutter app?
Container
MaterialApp
Scaffold
Column
Which property connects one screen to another in Flutter navigation?
body
child
home
Navigator
Which widget is commonly used to fix a RenderFlex overflow error?
SingleChildScrollView
Center
Container
Padding
If a widget property is plural, widgets must be separated by what and wrapped in what?
Semicolon, parentheses
Colon, brackets
Comma, square brackets [ ]
Period, braces
If a method returns a Widget, which keyword must be used?
return
void
yield
dynamic
Which properties are REQUIRED for an ElevatedButton widget?
color and text
onPressed and child
padding and margin
style and icon
Which widget allows swipe-from-edge navigation?
TabBar
AppBar
Drawer
BottomNavigationBar
Which widget appears at the top of the screen and displays the app title?
AppBar
Header
Container
Toolbar
Which property holds the main UI content inside a Scaffold?
Child
body
children
content
Which is the correct SQLite database name for a student database?
studentDatabase
student.sqlite
studentDB
students.db
Which is the proper Flutter project naming convention for a POS system?
pos system
pos_system
PosSystem
POS-System
Which method is used to create a new instance of a StatefulWidget?
build()
setState()
initState()
createState()
What is the purpose of the 'pubspec.yaml' file in a Flutter project?
To define the app's UI
To manage project dependencies
To store user preferences
To configure the database
Which widget is used to display a list of items in a scrollable view?
Row
Column
ListView
Stack
Which of the following is a valid way to declare a constant variable in Dart?
let x = 10;
var x = 10;
const int x = 10;
final int x = 10;
What is the purpose of the 'main()' function in a Dart application?
To handle user input
To create UI components
To initialize the database
To define the entry point of the application
Which widget is used to create a horizontal layout in Flutter?
ListView
Stack
Row
Column
What is the primary function of the 'build()' method in a Flutter widget?
To initialize the widget
To render the widget's UI
To dispose of the widget
To create the widget's state
Which widget is used to create a vertical layout in Flutter?
Column
Row
Stack
GridView
What is the purpose of the 'setState()' method in a StatefulWidget?
To create a new instance of the widget
To rebuild the widget with new data
To initialize the widget's state
To dispose of the widget
Which widget is used to create a vertical layout in Flutter?
Stack
Column
Row
ListView
What is the purpose of the 'dispose()' method in a StatefulWidget?
To initialize the widget's state
To clean up resources when the widget is removed
To create a new instance of the widget
To rebuild the widget with new data
Which widget is used to display an image in a Flutter app?
AssetImage
ImageView
Image
Picture
Which method is used to navigate to a new screen in Flutter?
push()
navigate()
moveTo()
goTo()
What is the purpose of the 'initState()' method in a StatefulWidget?
To dispose of resources
To update the widget's state
To build the widget tree
To initialize the widget's state
Which widget is used to create a scrollable list of items in Flutter?
Stack
ScrollView
ListView
GridView
What is the primary purpose of the 'build()' method in a StatefulWidget?
To initialize the widget's state
To create the widget's layout
To update the widget's state
To dispose of resources
Which widget is used to create a scrollable list of items in Flutter?
ListView
Stack
GridView
Column
What is the purpose of the 'Future' class in Dart?
To create a new widget
To handle asynchronous operations
To define a constant value
To manage state in a StatefulWidget
What is the role of the 'initState()' method in a StatefulWidget?
To initialize the widget's state
To build the widget's UI
To dispose of resources
To update the widget's state
Which widget is used to create a vertical layout of child widgets?
Stack
Column
Row
ListView
