MCQ_Flutter_unit_I_II
MCQ_Flutter_unit_I_II
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.
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
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
o A. Wrap
o B. ChipList
o C. HorizontalList
o D. Row
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