0% found this document useful (0 votes)
11 views

MCQ_Flutter_unit_I_II

The document provides a comprehensive overview of Flutter, an open-source UI toolkit developed by Google for creating cross-platform applications. It covers various aspects of Flutter, including widgets, state management, animations, and testing, along with specific commands and file configurations. Additionally, it highlights the advantages and drawbacks of using Flutter, as well as its capabilities for mobile, desktop, and web application development.

Uploaded by

rgpandey2015
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

MCQ_Flutter_unit_I_II

The document provides a comprehensive overview of Flutter, an open-source UI toolkit developed by Google for creating cross-platform applications. It covers various aspects of Flutter, including widgets, state management, animations, and testing, along with specific commands and file configurations. Additionally, it highlights the advantages and drawbacks of using Flutter, as well as its capabilities for mobile, desktop, and web application development.

Uploaded by

rgpandey2015
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

UNIT-I

1.What is Flutter?
A. Flutter is an open-source backend development framework
B. Flutter is an open-source UI toolkit
C. Flutter is an open-source programming language for cross-platform applications
D. Flutters is a DBMS toolkit
Answer: B. Flutter is an open-source UI toolkit for creating exceptional front-end cross-
platform applications.
2.Who developed the Flutter Framework and continues to maintain it today?
A. Facebook
B. Microsoft
C. Google
D. Oracle
Answer: C. Google began developing Flutter back in 2015 and supports its continued
development and maintenance today alongside a highly active open-source community.
3.Which programming language is used to build Flutter applications?
A. Kotlin
B. Dart
C. Java
D. Go
Answer: B. Flutter programs are written in Google's own Dart programming language.
4.How many types of widgets are there in Flutter?
A. 2
B. 4
C. 6
D. 8+
Answer: A. There are two types of widgets available to developers in Flutter. These are
stateful and stateless widgets.
5.When building for iOS, Flutter is restricted to an __ compilation strategy
A. AOT (ahead-of-time)
B. JIT (Just-in-time)
C. Transcompilation
D. Recompilation
Answer: A. Due to iOS restrictions on dynamic code execution Flutter apps must use AOT
compilation on the iOS platform.
6.A sequence of asynchronous Flutter events is known as a:
A. Flow
B. Current
C. Stream
D. Series
Answer: C. A sequence of asynchronous events is often referred to as a stream.
7.Access to a cloud database through Flutter is available through which service?
A. SQLite
B. Firebase Database
C. NOSQL
D. MYSQL
Answer: B. Firebase database allows for access to a cloud-based database provider for Flutter
applications.
8. What are some key advantages of Flutter over alternate frameworks?
A. Rapid cross-platform application development and debugging tools
B. Future-proofed technologies and UI resources
C. Strong supporting tools for application development and launch
D. All of the above
Answer: D. Flutter boasts all of these features for developers as improvements over
competing frameworks or native application development. Our guide to [the pros and cons of
Flutter development]() covers each of these in detail.
9. What element is used as an identifier for components when programming in Flutter?
A. Widgets
B. Keys
C. Elements
D. Serial
Answer: B. Keys are used in Flutter to uniquely identify widgets, elements, and
SemanticsNodes.
10.What type of test can examine your code as a complete system?
A. Unit tests
B. Widget tests
C. Integration Tests
D. All of the above
Answer: C. Integration tests will test Flutter code as one cohesive package and examine how
elements interact with each other.
11.What type of Flutter animation allows you to represent real-world behavior?
A. Physics-based
B. Maths-based
C. Graph-based
D. Sim-based
Answer: A. Physics-based animation allows you to simulate real-world behaviors in Flutter
applications
12. True or false: Flutter boasts improved runtime performance over most application
frameworks.
A. True
B. False
Answer: A. Flutter indeed boasts exceptional performance credentials when compared to
related application frameworks. Our comparison between Flutter and React Native takes a
deep dive into the topic and highlights where the strengths and weaknesses of each
technology lie.
13. What command would you use to compile your Flutter app in release mode?
A. Flutter --release
B. Flutter build --release
C. Flutter run --release
D. Flutter run $release
Answer: C. Flutter run --release will compile your application for release.
14. Which function will return the widgets attached to the screen as a root of the widget tree
to be rendered on screen?
A. main()
B. runApp()
C. container()
D. root()
Answer: B runApp() will return the widgets attached to the screen as the root of the widget
tree.
15. What is the key configuration file used when building a Flutter project?
A. pubspec.yaml
B. pubspec.xml
C. config.html
D. root.xml
Answer: A. pubspec.yaml lives at the base of a Flutter project and provides the necessary
configuration and setup to build Flutter apps.
16. True or false: an experienced Flutter developer doesn't need to know platform native
languages or tools to build apps.
A. True
B. False
Answer: B. False, a proficient Flutter developer would be expected to dive down into
platform code from time to time and debug errors or performance issues that are affecting the
application. When hiring a Flutter developer, this is a key skill to look out for and
something you should include in your Flutter hiring process.
17. Which component allows us to specify the distance between widgets on the screen?
A. SafeArea
B. SizedBox
C. table
D. AppBar
Answer: B. SizedBox is a widget that allows us to have a specified height or width between
two related widgets.
18. Which widget type allows you to modify its appearance dynamically according to user
input?
A. Stateful widget
B. Stateless widget
Answer: A. Stateful widgets allow you to modify their data in response to user input or
retrieving data.
19. What command would you run to verify your Flutter install and ensure your environment
is set up correctly?
A. Flutter run
B. Flutter build
C. Flutter doctor
D. Flutter help
Answer: C. Flutter doctor can check if your Flutter environment is set up correctly for
building Flutter applications.
20 Which release mode will not contain any debugging data when run?
A. Profile
B. Debug
C. Release
D. Test
Answer: C. Release mode apps are built optimized for performance and do not include
debugging messages for developers.
21. What language is Flutter's rendering engine primarily written in?
A. Kotlin
B. C++
C. Dart
D. Java
Answer: B. Flutter's rendering engine is primarily written in C++ to provide low-level
rendering using the Skia graphics library.
22. What is a drawback of Flutter that might lead you to choose another solution?
A. Non-native looking application UI
B. Large application footprint
C. A relatively unproven framework and language
D. All of the above
Answer: D. These are three of Flutter's primary drawbacks and reasons that developers may
wish to look at another solution for some types of apps.
23. True or False: Flutter supports desktop application development.
A. True
B. False
Answer: A. It's true, as of Flutter 3.0 support for desktop and web application development
has been moved into a stable release.
24.What widget would you use for repeating content in Flutter?
A. ExpandedView
B. ListView
C. Stack
D. ArrayView
Answer: B. The ListView is used for repeating content in the Flutter UI
25. True or False: Flutter teams are inherently more difficult to manage because the
framework is so new.
A. True
B. False
Answer: B. It's false. Flutter's booming popularity is evidence enough that Flutter teams are
not more difficult to manage or maintain than any other technology or tool. Our guide
to managing outsourced Flutter development teams has some best practices and guides on
how to do exactly that.

UNIT-II
1. Which of the following widget is used for repeating content in Flutter?
A. ListView B.ArrayView C.ExpandedView D.None of the these
2. .............. component allow us to specify the distance between widgets on the screen.
A.Table B. AppBar C. Sizedbox D.SafeArea
3. Which widget should you use to overlay text on top of an image in Flutter?
o A. Stack B. Column C. Row D. Container
Answer: A. Stack
4. Which of the following is true about the StatefulWidget in Flutter?
o A. It creates a widget that does not change over time.
o B. It is immutable.
o C. It creates a widget that can rebuild itself when its state changes.
o D. It does not manage any state.
Answer: C. It creates a widget that can rebuild itself when its state changes.

5. How can you update the state of a StatefulWidget in Flutter?


o A. By creating a new instance of the widget.
o B. By calling setState() inside the State class.
o C. By modifying the widget's constructor.
o D. By using the build method.
Answer: B. By calling setState() inside the State class
6. What widget is used to display a progress indicator in Flutter?
o A. ProgressBar
o B. LinearProgressIndicator
o C. ProgressIndicator
o D. CircularProgressIndicator
Answer: D. CircularProgressIndicator
7. Which widget can be used to create a horizontal list in Flutter?
o A. Column
o B. ListView with scrollDirection: Axis.horizontal
o C. Row
o D. Container
Answer: B. ListView with scrollDirection: Axis.horizontal
8.What is the default root widget of a Flutter application?
o A. Scaffold
o B. AppBar
o C. MaterialApp
o D. Container

9. What is the purpose of the pubspec.yaml file in a Flutter project?


o A. To define the app's layout.
o B. To specify the app's dependencies and assets.
o C. To manage database connections.
o D. To handle app routing.
Answer: B. To specify the app's dependencies and assets

10. Which widget in Flutter is used to display an image?


o A. Text
o B. Image
o C. Icon
o D. Button
Answer: B. Image
11. What does the build method do in a Flutter widget?
o A. It initializes the widget's state.
o B. It describes how to display the widget's UI.
o C. It starts the app.
o D. It handles user input.
Answer: B. It describes how to display the widget's UI.
12. What is the hot reload feature in Flutter?
o A. A feature to reload the app from scratch.
o B. A feature to add new dependencies.
o C. A feature that allows you to instantly see the changes in your code
without restarting the app.
o D. A debugging tool.
Answer: C. A feature that allows you to instantly see the changes in your code
without restarting the app
13. Which widget allows you to create a customizable button in Flutter?
o A. RaisedButton
o B. FlatButton
o C. ElevatedButton
o D. CustomButton
Answer: C. ElevatedButton
14. What is the primary role of the main.dart file in a Flutter project?
o A. To define the app's theme.
o B. To define the app's main entry point.
o C. To manage app routing.
o D. To store app assets
Answer: B. To define the app's main entry point
16. What widget is commonly used to create an AppBar in a Flutter application?
o A. AppBar
o B. ToolBar
o C. NavBar
o D. TopBar
Answer: A. AppBar

17. Which of the following is used to handle navigation in a Flutter app?


o A. Navigator
o B. NavigationView
o C. RouteManager
o D. NavController
Answer: A. Navigator

18. What is the purpose of the scaffold widget in Flutter?


o A. To manage the state of the app.
o B. To provide a consistent visual structure to the app.
o C. To handle animations.
o D. To define data models.
Answer: B. To provide a consistent visual structure to the app

19. Which of the following widgets can be used to create a floating action button
in Flutter?
o A. FloatingButton
o B. ActionButton
o C. FloatingActionButton
o D. RaisedButton
Answer: C. FloatingActionButton

20. Which widget is used to create a drop-down list in Flutter?


o A. DropdownButton
o B. DropdownList
o C. SelectBox
o D. ListView
Answer: A. DropdownButton

21. How do you retrieve the value from a TextField in Flutter?


o A. By using a TextEditingController.
o B. By directly accessing the TextField widget.
o C. By using the getValue method
o D. By using a global key
Answer: A. By using a TextEditingController

22. What widget is used to display a progress indicator in Flutter?


o A. ProgressBar
o B. LinearProgressIndicator
o C. ProgressIndicator
o D. CircularProgressIndicator
Answer: D. CircularProgressIndicator

23.What does the Expanded widget do in a Row or Column?


o A. It expands a child of a Row, Column, or Flex so that the child fills the
available space.
o B. It collapses a child of a Row, Column, or Flex
o C. It adds a fixed size to a child of a Row, Column, or Flex
o D. It makes a child widget scrollable.
Answer: A. It expands a child of a Row, Column, or Flex so that the child fills
the available space.

24. Which of the following methods is used to change the state of a widget in a
StatefulWidget?
o A. changeState
o B. setState
o C. updateState
o D. rebuildState
25. What is the purpose of the Align widget in Flutter?
o A. To align its child within itself.
o B. To align multiple children in a row.
C. To create a flex layout.
o D. To handle gestures
26. What widget is used to display web content in a Flutter application?
o A. WebView
o B. WebContent
o C. WebFrame
o D. WebContainer
Answer: A. WebView
27. What is the purpose of the Spacer widget in Flutter?
o A. To create space between widgets in a Row or Column
o B. To add padding to a widget.
o C. To create a divider between widgets.
o D. To handle widget alignment.
28. Which widget is used to add a shadow to a box in Flutter?

o A. BoxShadow
o B. ShadowContainer
o C. ElevationBox
o D. Container
Answer: A. BoxShadow
29. What is the purpose of the IndexedStack widget in Flutter?
o A. To show one child from a list of children based on an index.
o B. To stack widgets on top of each other
o C. To create a list of items with indexes.
o D. To manage multiple navigation stacks

30. Which of the following is used to layout widgets in a linear fashion either
vertically or horizontally?
o A. Column and Row
o B. Stack and Align
o C. Center and Align
o D. GridView and ListView
Answer: A. Column and Row
31Which widget can be used to implement a drawer in a Flutter application?
o A. Drawer
o B. SidePanel
o C. NavigationDrawer
o D. SlidingPanel
Answer: A. Drawer
32. How do you create a bottom navigation bar in Flutter?
o A. Using the BottomNavigationBar widget.
o B. Using the BottomAppBar widget.
o C. Using the BottomBar widget.
o D. Using the NavBar widget.
Answer: A. Using the BottomNavigationBar widget

33. Which command is used to run a Flutter app on an emulator?


o A. flutter run.
o B. flutter start.
o C. flutter emulate.
o D. flutter launch.
Answer: A. flutter run
34. What widget is used in Flutter to create a single-line text input field?
o A. InputField
o B. TextField
o C. TextInput
o D. TextBox
Answer: B. TextField
35. Which method in Flutter is used to dispose of a StatefulWidget?
o A. disposeWidget
o B. terminate.
o C. dispose
o D. endWidget

36. Which widget is used to create a tabbed interface in Flutter?


o A. TabBar
o B. TabView
o C. Tabs
o D. TabContainer
Answer: A. TabBar
37. Which widget is used to display a list of horizontal chips in Flutter?

o A. Wrap
o B. ChipList
o C. HorizontalList
o D. Row

38. What does the MainAxisAlignment property control in a Row or Column?


o A. The alignment of children along the main axis
o B. The spacing between children
o C. The alignment of children along the cross axis
o D. The size of the main axis
Answer: A. The alignment of children along the main axis

39. Which widget allows you to add a linear gradient background to a container?
o A. Container with BoxDecoration
o B. GradientContainer
o C. LinearGradientContainer
o D. BackgroundGradient
40. What is the purpose of the MaterialPageRoute widget in Flutter?
o A. To define a route to a new page with material design transition
o B. To handle HTTP requests
o C. To manage theme data
o D. To create a navigation drawer

You might also like