flutter banner

Flutter Multiple Choice Questions (MCQs) and Answers

Master Flutter with Practice MCQs. Explore our curated collection of Multiple Choice Questions. Ideal for placement and interview preparation, our questions range from basic to advanced, ensuring comprehensive coverage of Flutter concepts. Begin your placement preparation journey now!

Q1

Q1 What is the primary advantage of using Flutter in mobile app development?

A

To enable server-side rendering of applications

B

To provide a back-end framework for mobile apps

C

To facilitate the rapid development of cross-platform mobile applications with a single codebase

D

To enhance the security features of mobile applications

Q2

Q2 Who maintains Flutter?

A

Microsoft

B

Facebook

C

Google

D

Apple

Q3

Q3 What language is used to write Flutter apps?

A

Java

B

Kotlin

C

Swift

D

Dart

Q4

Q4 Which of the following platforms is NOT supported by Flutter?

A

iOS

B

Android

C

Web

D

Nintendo Switch

Q5

Q5 How does Flutter achieve high performance in rendering?

A

Using WebView

B

Using a JavaScript engine

C

Using Skia for rendering

D

Using native device widgets

Q6

Q6 What is a common use of Flutter's hot reload feature?

A

To optimize app performance

B

To reduce the app size

C

To quickly view changes in the UI without restarting the app

D

To secure the app from vulnerabilities

Q7

Q7 Which command is used to create a new Flutter project?

A

flutter run

B

flutter create

C

flutter build

D

flutter start

Q8

Q8 Which widget in Flutter is used to create a visual hierarchy of the UI that controls the user interface layout?

A

MaterialApp

B

Widget

C

Scaffold

D

Column

Q9

Q9 Which IDE is commonly used for Flutter development?

A

Visual Studio

B

PyCharm

C

Eclipse

D

Android Studio

Q10

Q10 What command installs Flutter on macOS?

A

flutter install

B

brew install flutter

C

apt-get install flutter

D

install flutter

Q11

Q11 Which operating system does not support Flutter development?

A

Windows

B

macOS

C

Linux

D

MS-DOS

Q12

Q12 What is the purpose of the Flutter Doctor command?

A

To build the app

B

To run unit tests

C

To check the environment setup

D

To deploy the app

Q13

Q13 How do you update the Flutter SDK?

A

flutter upgrade

B

flutter update

C

flutter refresh

D

flutter reinstall

Q14

Q14 What is the first step in setting up Flutter on a new machine?

A

Installing the Flutter SDK

B

Creating a new project

C

Running flutter doctor

D

Configuring the IDE

Q15

Q15 What is the correct command to create a new Flutter project named my_app?

A

flutter new my_app

B

flutter init my_app

C

flutter create my_app

D

flutter start my_app

Q16

Q16 Which file must be configured to use Firebase in a Flutter project?

A

index.html

B

main.dart

C

pubspec.yaml

D

settings.gradle

Q17

Q17 What command initializes a Flutter app in an existing directory?

A

flutter create --init

B

flutter start --init

C

flutter init

D

flutter create .

Q18

Q18 What might cause a Flutter project to fail to build after setup?

A

Incorrect project name

B

Missing dependencies

C

Using a dark theme

D

Incorrect Flutter version

Q19

Q19 If running flutter doctor shows issues, what is a likely first step to resolve them?

A

Reinstall Flutter

B

Run flutter clean

C

Restart the IDE

D

Follow the recommendations provided by flutter doctor

Q20

Q20 Which of the following is a valid variable declaration in Dart?

A

var name = "John";

B

int number = 42;

C

String text = 'Hello';

D

All of the above

Q21

Q21 What is Dart primarily used for in Flutter?

A

Back-end development

B

Database management

C

User interface development

D

None of the above

Q22

Q22 Which keyword is used to define a constant value in Dart?

A

constant

B

static

C

final

D

const

Q23

Q23 What type does the main function return in a Dart application?

A

void

B

int

C

String

D

dynamic

Q24

Q24 Which of the following is NOT a built-in type in Dart?

A

int

B

float

C

String

D

bool

Q25

Q25 What does the async keyword indicate in Dart?

A

A function is synchronous

B

A function returns an integer

C

A function is asynchronous

D

A function returns a string

Q26

Q26 Which Dart collection is used to store key-value pairs?

A

List

B

Set

C

Map

D

Queue

Q27

Q27 What is the output of the following Dart code snippet?
\n\n\nvoid main() {
\n List numbers = [1, 2, 3];
\n print(numbers[1]);
\n}\n

A

0

B

1

C

2

D

3

Q28

Q28 How do you declare a nullable variable of type int in Dart?

A

int? num;

B

int num?;

C

nullable int num;

D

int num = null;

Q29

Q29 What is the correct way to handle a potential null value using null-aware operators in Dart?
\n\n\nint? a = null;
\nint b = a ?? 0;
\nprint(b);\n

A

0

B

null

C

Throws an error

D

undefined

Q30

Q30 If a Dart program throws a NoSuchMethodError, what is a likely cause?

A

A method is missing a return type

B

A method is called on a null object

C

A method is missing parameters

D

A method is using the wrong return type

ad verticalad vertical
ad