wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz 2 6/8/2025

Total questions: 20

Worksheet time: 3mins

Name
Class
Date
1.

Which of the following best describes a function in Dart?

a)

a) A variable that stores a string

b)

b) A loop used for iteration

c)

c) A block of code that performs a specific task

d)

d) A built-in data type in Dart

2.

In Dart, what are 10 and 20 called in the following function call?
add(10, 20);

a)

a) Parameters

b)

b) Arguments

c)

c) Variables

d)

d) Return values

3.

What is the syntax of an anonymous function in Dart?

a)

a) function() => {}

b)

b) function() => expression;

c)

c ) () { /* code */ }

d)

d) { function() }

4.

What will happen if you pass positional parameters in the wrong order in Dart?

a)

a) It may produce wrong results

b)

b) It gives a syntax error

c)

c) Dart automatically reorders them

d)

d) The program crashes

5.

What is the purpose of the super keyword in Dart?

a)

a) To initialize default values

b)

b) To create a new instance of a class

c)

c) To access properties and methods of a parent class

d)

d) To define private methods

6.

What type of inheritance is NOT supported in Dart?

a)

a) Multiple Inheritance

b)

b) Multilevel Inheritance

c)

c) Hierarchical Inheritance

d)

d) Single Inheritance

7.
  1. Which of the following is TRUE about constructors in Dart?

a)
  1. a) Constructor names must be different from class names

b)
  1. b) Constructors return a string by default

c)
  1. c) Dart does not support constructors

d)
  1. d) Constructors are automatically called when an object is created

8.

Which of the following best defines polymorphism in Dart?

a)

a) Using the same variable across different programs

b)

b) The ability of an object to take on many forms

c)

c) Assigning multiple values to a single variable

d)

d) The ability to write multiple main() methods

9.

What widget acts as the base layout structure in most Flutter apps?

a)

a) Scaffold

b)

b) Text

c)

c) Column

d)

d) MaterialApp

10.

What kind of UI design systems does Flutter support?

a)

a) WPF and Electron

b)

b) HTML5 & Bootstrap

c)

c) Material Design and Cupertino

d)

d) Windows Forms & GTK

11.
  1. Which tool is recommended to install Flutter SDK on Ubuntu via terminal?

a)
  1. a) apt-get

b)
  1. b) brew

c)
  1. c) snap

d)
  1. d) yum

12.

Which file in a Flutter project defines dependencies and app metadata?

a)

a) main.dart

b)

b) pubspec.yaml

c)

c) build.gradle

d)

d) manifest.json

13.

What command is used to create a new Flutter project?

a)

a) flutter start myapp

b)

b) flutter create myapp

c)

c) flutter init

d)

d) flutter run myapp

14.

What is a widget in Flutter?

a)

a) A backend service

b)

b) A plugin for Android

c)

c) An immutable description of a part of the user interface

d)

d) A build script for Flutter apps

15.

Which of the following widgets maintains state in Flutter?

a)

a) Text

b)

b) StatefulWidget

c)

c) Column

d)

d) StatelessWidget

16.
  1. What does the floatingActionButton in Scaffold represent?

a)
  1. a) A drawer icon

b)
  1. b) circular button floating above content for primary action

c)
  1. c) A loading spinner

d)
  1. d) An elevated menu

17.

Which of the following is an example of a StatelessWidget?

a)

a) Checkbox

b)

b) Text

c)

c) Slider

d)

d) TextField

18.
  1. Which Scaffold property displays content below the AppBar and above the FloatingActionButton?

a)
  1. a) drawer

b)
  1. b) bottomNavigationBar

c)
  1. c) body

d)
  1. d) persistentFooterButtons

19.

What is the default position of the floatingActionButton in a Scaffold?

a)

a) Top right

b)

b) Bottom left

c)

c) Center bottom

d)

d ) Bottom right

20.

Which Flutter button is a flat button with no elevation and no border by default?


a)

a) TextButton

b)

b) ElevatedButton

c)

c) OutlinedButton

d)

d) IconButton