0% found this document useful (0 votes)
10 views31 pages

Flutter MCQ Questions 1 To 100

The document is a question bank containing 100 multiple-choice questions (MCQs) related to Flutter, covering various topics such as widgets, state management, Firebase integration, testing, and more. Each question is followed by four answer options, with the correct answer indicated. This resource serves as a study guide for individuals looking to enhance their knowledge and skills in Flutter development.

Uploaded by

sunny22csu265
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views31 pages

Flutter MCQ Questions 1 To 100

The document is a question bank containing 100 multiple-choice questions (MCQs) related to Flutter, covering various topics such as widgets, state management, Firebase integration, testing, and more. Each question is followed by four answer options, with the correct answer indicated. This resource serves as a study guide for individuals looking to enhance their knowledge and skills in Flutter development.

Uploaded by

sunny22csu265
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Flutter MCQ Question Bank (1-100)

1. What is Flutter?

A. SDK for iOS only

B. SDK for building natively compiled apps for mobile, web, and desktop

C. Web development language

D. None of the above

Answer: B

2. Who developed Flutter?

A. Facebook

B. Apple

C. Google

D. Microsoft

Answer: C

4. Which widget helps to arrange children horizontally?


A. Column
B. ListView
C. Stack
D. Row
Answer: D

5. Which widget is used to overlay widgets on top of each other?


A. Column
B. Stack
C. Row
D. Container
Answer: B
6. Which widget gives padding to a child widget?
A. Margin
B. Align
C. Padding
D. SizedBox
Answer: C

7. What does Expanded widget do in a Row?


A. Shrinks the widget
B. Expands to fit the content
C. Fills available space proportionally
D. Hides the widget
Answer: C

8. What is the purpose of TextEditingController?


A. To style text
B. To animate text
C. To handle user input from TextField
D. To validate form
Answer: C

9. Which widget is used to create buttons in Flutter?


A. Action
B. PressButton
C. ElevatedButton
D. Flat
Answer: C

10. What is the default axis of ListView?


A. Horizontal
B. Vertical
C. Diagonal
D. Rotated
Answer: B

11. What does Navigator.pop() do?


A. Navigates to home
B. Exits the app
C. Returns to the previous screen
D. Deletes current widget
Answer: C

12. How do you pass data to a new screen in Flutter?


A. Through Navigator ID
B. Through Widgets only
C. Using route arguments
D. Using AppBar
Answer: C

13. What is the purpose of named routes?


A. To give routes colors
B. To manage navigation using route names
C. To assign IDs to widgets
D. To avoid using Navigator
Answer: B

14. Which widget manages routing stack internally?


A. MaterialApp
B. RouteManager
C. AppRoute
D. Navigator
Answer: D

15. What is returned by a Navigator.push() method?


A. Route name
B. String
C. Future
D. Widget
Answer: C

16. What is the most basic state management in Flutter?


A. Bloc
B. Redux
C. Provider
D. setState()
Answer: D
17. Which class in Flutter allows dynamic changes in UI?
A. StatelessWidget
B. StatefulWidget
C. Scaffold
D. Column
Answer: B

18. What is the function of setState()?


A. Initializes state
B. Disposes the widget
C. Rebuilds the widget tree
D. Builds the widget
Answer: C

19. What is the purpose of initState()?


A. To rebuild UI
B. To create variables after widget is removed
C. To initialize data once when widget is created
D. To display layout
Answer: C

20. What happens when dispose() is called?


A. It deletes the widget
B. It initializes state again
C. It frees resources before widget is destroyed
D. It reloads the app
Answer: C

21. Which provider package is officially recommended by Flutter team?


A. bloc
B. mobx
C. provider
D. redux
Answer: C

22. In which scenario should you avoid using setState()?


A. For temporary updates
B. Inside stateless widget
C. In StatefulWidget
D. For simple counters
Answer: B

23. Which class is used to listen to changes in Provider?


A. ChangeBuilder
B. ProviderWatcher
C. Consumer
D. ValueObserver
Answer: C

24. What is the difference between final and const in Dart?


A. final is compile-time constant, const is run-time
B. const is compile-time constant, final is run-time
C. Both are the same
D. None
Answer: B

25. Which widget rebuilds automatically when state changes in Provider?


A. StatelessWidget
B. Scaffold
C. Consumer
D. AppBar
Answer: C

26. Which package is required to enable Firebase in a Flutter app?


A. firebase_start
B. firebase_base
C. firebase_core
D. firebase_ui
Answer: C

27. What is the correct order to initialize Firebase in the main.dart file?
A. runApp() → Firebase.initializeApp()
B. Firebase.initializeApp() → runApp()
C. init() → runApp()
D. firebaseInit() → MaterialApp()
Answer: B

28. Which Firebase service would you use to authenticate users with email/password?
A. firebase_auth
B. cloud_firestore
C. firebase_storage
D. firebase_login
Answer: A

29. What is Firestore in Firebase?


A. A relational database
B. A NoSQL cloud database
C. A cloud hosting service
D. A real-time analytics tool
Answer: B

30. Which method signs out a user from Firebase?


A. Firebase.logout()
B. FirebaseAuth.instance.signOut()
C. Auth.signOutUser()
D. FirebaseSignOut()
Answer: B

31. Which widget provides animated changes in size, color, or margin?


A. AnimatedContainer
B. ListView
C. AnimationBuilder
D. Tween
Answer: A

32. Which mixin is required to control animations in a StatefulWidget?


A. AnimationMixin
B. TickerProviderStateMixin
C. AnimateStateMixin
D. TweenProvider
Answer: B
33. Which animation class provides a range of values between two limits?
A. Curve
B. AnimatedBuilder
C. Tween
D. Stream
Answer: C

34. What does the AnimationController do?


A. Plays a video
B. Manages animation timing
C. Tracks gestures
D. Controls scroll
Answer: B

35. Which widget is used for building animations without rebuilding the whole widget tree?
A. AnimationController
B. AnimatedBuilder
C. Container
D. Tween
Answer: B

36. What is the default return type of an asynchronous function in Dart?


A. int
B. double
C. Future
D. String
Answer: C

37. What keyword is used to wait for a Future to complete in Dart?


A. wait
B. delay
C. future
D. await
Answer: D

38. What does async mean in Dart?


A. Function has no return
B. Function returns void
C. Function returns a Future and can use await
D. Function returns a stream
Answer: C

39. What is the use of Stream in Dart?


A. Stores constants
B. Handles future data events over time
C. Replaces lists
D. Animates UI
Answer: B

40. Which collection type is ordered and indexed in Dart?


A. Map
B. Set
C. List
D. Future
Answer: C

41. What is the function of shared_preferences plugin in Flutter?


A. Store files
B. Local storage of key-value data
C. Upload files to Firebase
D. Encrypt passwords
Answer: B

42. Which command runs your Flutter project on a connected device?


A. flutter start
B. flutter install
C. flutter run
D. flutter execute
Answer: C

43. How do you add dependencies in a Flutter project?


A. main.dart
B. android/build.gradle
C. pubspec.yaml
D. lib/dependencies.dart
Answer: C
44. What is a FutureBuilder used for?
A. Create background tasks
B. Listen to real-time changes
C. Build widgets based on a future result
D. Navigate between routes
Answer: C

45. How do you prevent UI rebuilds in an optimized widget?


A. Use final everywhere
B. Use StatelessWidget
C. Use const constructors
D. Avoid MaterialApp
Answer: C

46. What is hot restart in Flutter?


A. Restarts app and resets app state
B. Only rebuilds changed widgets
C. Reloads main.dart only
D. Restarts emulator
Answer: A

47. What is a build context?


A. The UI layout
B. The parent widget
C. The location of a widget in the widget tree
D. The device screen size
Answer: C

48. What is the purpose of ListView.builder()?


A. Builds a grid
B. Creates a fixed list
C. Efficiently builds a large scrollable list
D. Used only with Firebase
Answer: C

49. What is the function of const constructor in Flutter?


A. Makes widget mutable
B. Makes widget reload every time
C. Makes widget instance immutable and reused
D. Ignores widget tree
Answer: C

50. How do you handle JSON data in Dart?


A. json.parse()
B. decode()
C. jsonDecode()
D. getJSON()
Answer: C

51. Which state management solution is based on streams and events?


A. Provider
B. Riverpod
C. Bloc
D. MobX
Answer: C

52. What does the Cubit class in Bloc do?


A. Handles routing
B. Manages minimal state logic
C. Connects to Firebase
D. Builds widgets
Answer: B

53. Which package allows dependency injection in Flutter?


A. http
B. GetX
C. dart_inject
D. Dio
Answer: B

54. What is ChangeNotifier used for?


A. Sending emails
B. Animating widgets
C. Notifying listeners about state changes
D. Building UIs
Answer: C

55. What’s the core concept behind Riverpod?


A. Platform channels
B. Pure dependency injection
C. Firebase bindings
D. Animations
Answer: B

56. What is context.read<T>() used for in Provider?


A. Get current theme
B. Access a provider without listening
C. Listen to state changes
D. Navigate to new screen
Answer: B

57. What is the role of MultiProvider?


A. Send emails to multiple users
B. Register multiple providers
C. Handle state across multiple platforms
D. Use multiple widgets
Answer: B

58. What is the advantage of Bloc over setState()?


A. Simpler code
B. UI-only updates
C. Clear separation of logic and UI
D. Automatic animations
Answer: C

59. Which function does BlocBuilder perform?


A. Handles form validation
B. Builds widgets on Bloc state change
C. Sends data to Firestore
D. Reads files
Answer: B
60. In Provider, how do you trigger a rebuild when data changes?
A. call()
B. notifyListeners()
C. run()
D. build()
Answer: B

61. What does MediaQuery.of(context).size return?


A. Appbar height
B. Keyboard status
C. Device screen size
D. Widget padding
Answer: C

62. Which layout widget lets you position widgets absolutely?


A. Stack
B. Row
C. Column
D. ListView
Answer: A

63. What does Flexible do inside a Row or Column?


A. Breaks layout
B. Forces minimum width
C. Shares space with flexibility
D. Expands equally
Answer: C

64. What widget is used to apply constraints (e.g., min/max width)?


A. SizedBox
B. Container
C. ConstrainedBox
D. SafeArea
Answer: C
65. Which widget handles notches or status bars safely?
A. Stack
B. SafeArea
C. Padding
D. Inset
Answer: B

66. How do you add shadows in Flutter?


A. shadowColor
B. addShadow()
C. elevation
D. outline
Answer: C

67. What is the main axis in a Column layout?


A. Horizontal
B. Vertical
C. Diagonal
D. None
Answer: B

68. Which widget makes child widgets scrollable horizontally?


A. SingleChildScrollView (horizontal axis)
B. ListView
C. PageView
D. GridView
Answer: A

69. Which widget gives rounded corners to a container?


A. Border
B. RadiusBox
C. ClipRRect
D. CurveBox
Answer: C

70. How do you apply a linear gradient in Flutter?


A. LinearColor
B. ShaderPaint
C. BoxDecoration with LinearGradient
D. GradientWidget
Answer: C

71. Which package is used for unit testing in Flutter?


A. flutter_test
B. test_driver
C. flutter_unit
D. flutter_run_test
Answer: A

72. What is the method to write a test case in Flutter?


A. start()
B. check()
C. test()
D. execute()
Answer: C

73. What is widget testing used for?


A. Testing APIs
B. Checking widget tree and UI behavior
C. Firebase sync
D. Network calls
Answer: B

74. How do you pump widgets in test cases?


A. widgetBuilder()
B. tester.pumpWidget()
C. buildTest()
D. test.init()
Answer: B

75. What is golden testing in Flutter?


A. Measuring frame rates
B. Comparing UI with reference images
C. Testing routes
D. Checking null errors
Answer: B

76. What does expect() do in tests?


A. Calls an API
B. Launches UI
C. Compares actual vs expected values
D. Resets the test
Answer: C

77. Which file do you modify to add test dependencies?


A. main.dart
B. build.gradle
C. pubspec.yaml
D. index.html
Answer: C

78. What command runs all Flutter test cases?


A. flutter test
B. flutter run test
C. flutter check
D. flutter start tests
Answer: A

79. What is integration testing in Flutter?


A. UI + unit testing
B. Tests app as whole (UI + backend + services)
C. Tests only Android code
D. Checks constants
Answer: B

80. Which folder contains test files by default?


A. /lib/test
B. /android/tests
C. /test
D. /tests/flutter
Answer: C
81. What does a red screen in Flutter generally indicate?
A. Success
B. Build completion
C. UI error
D. Null safety
Answer: C

82. Which tool is used to inspect widget tree in Flutter?


A. Flutter DevTools
B. flutter_viewer
C. widgetAnalyzer
D. Dart UI
Answer: A

83. What is flutter doctor used for?


A. Fix code bugs
B. Diagnose environment setup
C. Deploy app
D. Upgrade packages
Answer: B

84. What is the format of Flutter release build for Android?


A. .zip
B. .aab or .apk
C. .ios
D. .flutter
Answer: B

85. How do you generate a release build for Android?


A. flutter create
B. flutter release
C. flutter build apk
D. flutter build dev
Answer: C

86. Which command builds an iOS release?


A. flutter build ios
B. flutter ios release
C. flutter run ios
D. flutter ios build
Answer: A

87. Which file stores app permissions for Android?


A. AndroidManifest.xml
B. Info.plist
C. gradle.build
D. pubspec.yaml
Answer: A

88. Where do you define app version and build number?


A. pubspec.yaml
B. build.gradle
C. main.dart
D. appconfig.dart
Answer: A

89. What tool is used for obfuscating Dart code during release?
A. minify
B. --obfuscate flag
C. dart_encrypt
D. flutter hide
Answer: B

90. What is the default mode when running Flutter apps via flutter run?
A. Release
B. Debug
C. Test
D. Profile
Answer: B

91. Can Flutter build for web?


A. No
B. Yes, with flutter_web
C. Yes, using stable Flutter SDK
D. Only for Chrome
Answer: C
92. Which command enables web support in Flutter?
A. flutter web enable
B. flutter channel stable
C. flutter config --enable-web
D. flutter upgrade
Answer: C

93. Which plugin is used to access the camera?


A. flutter_video
B. media_plugin
C. camera
D. photokit
Answer: C

94. How does Flutter communicate with native code?


A. Android bridge
B. Dart interop
C. Platform channels
D. Plugin bridge
Answer: C

95. What plugin helps in picking images from the gallery?


A. flutter_picker
B. file_picker
C. image_picker
D. media_chooser
Answer: C

96. What plugin allows opening URLs in a browser?


A. url_launcher
B. http_open
C. browser_url
D. web_launcher
Answer: A

97. What is the use of get_it package?


A. HTTP requests
B. State rebuild
C. Service locator for dependency injection
D. UI styling
Answer: C

98. Which method is used to handle lifecycle events in Flutter?


A. init()
B. lifecycle()
C. WidgetsBindingObserver
D. onResume()
Answer: C

99. What does flutter clean do?


A. Cleans emulator cache
B. Deletes build files
C. Removes main.dart
D. Clears Firebase logs
Answer: B

100. Which Flutter build mode is used for performance testing?


A. Debug
B. Profile
C. Release
D. Dev
Answer: B

Page 1

101. What is the parent widget of all Flutter apps?


A. runApp
B. MaterialApp
C. Scaffold
D. AppBar
Answer: B
102. What widget do you use for tabs?
A. TabWidget
B. AppBar
C. TabBar
D. NavigationBar
Answer: C
103. Which class is used for creating immutable widgets?
A. StatefulWidget
B. StatelessWidget
C. ImmutableWidget
D. PermanentWidget
Answer: B
104. What type of widget is TextField?
A. Stateless
B. Stateful
C. Static
D. Dynamic
Answer: B
105. Which widget wraps content in a scrollable layout?
A. ScrollBox
B. Scrollable
C. SingleChildScrollView
D. ViewScroll
Answer: C
106. Which constructor is used to initialize a stateful widget?
A. createState
B. setState
C. initState
D. buildState
Answer: A
107. What is the purpose of main() in Dart?
A. Start animation
B. Root method of execution
C. Define routes
D. Initialize database
Answer: B
108. Which method is always required in a StatelessWidget?
A. initState
B. dispose
C. build
D. setState
Answer: C
109. What does Scaffold provide in a Flutter app?
A. Routing
B. API Calls
C. Basic material structure
D. Animation
Answer: C
110. Which function in Dart represents a delay?
A. delay()
B. async()
C. wait()
D. Future.delayed()
Answer: D
111. What type of layout is Wrap?
A. Fixed layout
B. Overlapping layout
C. Adaptive flow layout
D. Scroll layout
Answer: C
112. What is the purpose of Spacer() in a Row or Column?
A. Add margin
B. Add padding
C. Occupy space proportionally
D. Add decoration
Answer: C
113. What happens if a widget has no key and rebuilds?
A. Widget is retained
B. It always recreates the widget
C. Crashes
D. Loses context
Answer: B
114. What does .of(context) retrieve in most cases?
A. Child widget
B. Size of screen
C. Nearest ancestor widget
D. Route info
Answer: C
115. Which lifecycle method is used before destroying a widget?
A. build
B. initState
C. dispose
D. deactivate
Answer: C
116. What is GestureDetector used for?
A. Detect text input
B. Detect scrolling
C. Detect user touch events
D. Detect screen size
Answer: C
117. What is the difference between push and pushReplacement?
A. push adds; pushReplacement replaces the stack
B. No difference
C. pushReplacement adds duplicate
D. push uses old context
Answer: A
118. Which widget creates a dropdown list?
A. DropDown
B. ListTile
C. DropdownButton
D. SelectButton
Answer: C
119. Which property of Text widget allows overflow control?
A. maxLines
B. overflow
C. softWrap
D. all of the above
Answer: D
120. Which widget creates a switch button?
A. ToggleButton
B. Switch
C. BooleanButton
D. FlipSwitch
Answer: B
121. What does setState() trigger?
A. Only data update
B. UI rebuild
C. Memory cleanup
D. App restart
Answer: B
122. Which Flutter widget provides a drop shadow and rounded corners?
A. Card
B. Row
C. Column
D. Material
Answer: A
123. What is the role of mainAxisAlignment?
A. Alignment along main axis
B. Border setup
C. Child limit
D. Color management
Answer: A
124. What does Alignment.centerRight represent?
A. Top left
B. Center of screen
C. Center right of parent
D. Right top
Answer: C
125. Which widget allows selection from calendar?
A. CalendarView
B. DatePicker
C. Calendar
D. showDatePicker
Answer: D
126. Which function initializes state in StatefulWidget?
A. init()
B. initState()
C. createState()
D. build()
Answer: B
127. Which tool helps to visualize widget layout in Flutter?
A. WidgetTracer
B. FlutterTree
C. Flutter DevTools
D. Debugger
Answer: C
128. What is a snackbar in Flutter?
A. Modal alert
B. Temporary message at screen bottom
C. Input field
D. Navigation bar
Answer: B
129. What is a Drawer in Flutter?
A. Pop-up
B. Scrollable list
C. Side navigation panel
D. Splash screen
Answer: C
130. How do you check if a variable is null in Dart?
A. x == null
B. isNull(x)
C. x.equals(null)
D. x.isEmpty
Answer: A
131. What does Future.value() return?
A. A delayed result
B. A stream
C. A completed future
D. A timeout
Answer: C
132. What operator handles nullable values in Dart?
A. ??
B. ::
C. ?=
D. ->
Answer: A
133. What is the purpose of GlobalKey?
A. Restart widget
B. Track widget state
C. Style widget
D. Position widget
Answer: B
134. How do you show a modal bottom sheet?
A. showBottomDialog
B. displayModal
C. showModalBottomSheet
D. ModalBuilder
Answer: C
135. How do you perform animations in a list?
A. ListView.animate
B. ImplicitList
C. AnimatedList
D. TransitionList
Answer: C
136. What is the file extension of Dart files?
A. .dart
B. .flutter
C. .ftr
D. .dscript
Answer: A
137. What does the key parameter do in Flutter widgets?
A. Authenticates
B. Binds data
C. Preserves widget state
D. Adds animation
Answer: C
138. How do you wrap content in rounded card-like style?
A. ClipOval
B. ClipRRect
C. Card
D. InkWell
Answer: C
139. How do you listen to keyboard inputs in TextField?
A. keyBoardListener
B. KeyboardEvent
C. onChanged
D. onType
Answer: C
140. What widget is used for creating alert popups?
A. AlertBar
B. Snackbar
C. AlertDialog
D. DialogBox
Answer: C

141. Which layout widget places children in a horizontal array?


A. Column
B. Row
C. Stack
D. ListView
Answer: B
142. What does Expanded widget do in a Row/Column?
A. Shrinks content
B. Fills available space
C. Ignores child
D. Centers child
Answer: B
143. Which widget lets children overflow parent?
A. Stack
B. OverflowBox
C. Row
D. Card
Answer: B
144. What keyword is used to declare a constant in Dart?
A. const
B. static
C. fixed
D. val
Answer: A
145. What is the best way to create responsive UIs in Flutter?
A. LayoutBuilder and MediaQuery
B. Absolute sizing
C. Hardcoded pixels
D. StatelessWidget
Answer: A
146. Which widget lets you build items on-demand for performance?
A. ListView
B. ListView.builder
C. Column
D. SingleChildScrollView
Answer: B
147. Which Flutter package helps with HTTP requests?
A. socket_io
B. rest_flutter
C. http
D. connect
Answer: C
148. What’s the default orientation of a Column widget?
A. Horizontal
B. Vertical
C. Diagonal
D. Auto
Answer: B
149. What is a child in Flutter widgets?
A. Child function
B. Input variable
C. Widget nested inside another widget
D. Dart class
Answer: C
150. What is MediaQuery.of(context).size used for?
A. Get widget size
B. Get text size
C. Get screen size
D. Get padding
Answer: C
151. What is the build context used for in Flutter?
A. Data caching
B. Widget rendering
C. Tree location reference
D. Animation
Answer: C
152. Which widget stacks widgets on top of each other?
A. Column
B. Stack
C. GridView
D. Box
Answer: B
153. What does Flexible do in a layout?
A. Fixes the layout
B. Resizes child proportionally
C. Ignores size
D. Animates content
Answer: B
154. What does Visibility widget do?
A. Show/hide child
B. Resize parent
C. Destroy child
D. Paint background
Answer: A
155. What package is used for state management in Flutter?
A. sqflite
B. provider
C. fluttertoast
D. shimmer
Answer: B
156. How do you cache images in Flutter?
A. image_cache
B. NetworkImage
C. CachedNetworkImage
D. Image.memory
Answer: C
157. Which function initializes Firebase in Flutter?
A. Firebase.boot()
B. Firebase.init()
C. Firebase.initializeApp()
D. Firebase.connect()
Answer: C
158. How can you create a circular image in Flutter?
A. ClipOval
B. CircleAvatar
C. Container with borderRadius
D. All of the above
Answer: D
159. What widget can hold multiple scrollable children?
A. Stack
B. TabBarView
C. NestedScrollView
D. CustomScrollView
Answer: C
160. What’s the primary purpose of AppBar?
A. Show footer
B. Display header with title/actions
C. Navigate pages
D. Animate content
Answer: B
161. What is a Navigator in Flutter?
A. Manages routing stack
B. Widget builder
C. Text controller
D. Image loader
Answer: A
162. What does the InkWell widget detect?
A. Errors
B. Long press
C. Tap gestures
D. Drag events
Answer: C
163. How do you round the corners of a Container?
A. shape
B. decoration → borderRadius
C. align
D. clip
Answer: B
164. What is the result of passing null to a required parameter?
A. Warning
B. Compile-time error
C. Runtime crash
D. Ignored
Answer: B
165. Which state management technique is the most built-in and simple?
A. Bloc
B. Provider
C. setState
D. Redux
Answer: C
166. What does late keyword in Dart mean?
A. Lazy-initialized variable
B. Constant
C. Global variable
D. Final variable
Answer: A
167. Which property defines scroll direction in ListView?
A. orientation
B. scrollAxis
C. direction
D. scrollDirection
Answer: D
168. How do you get current screen width in Flutter?
A. LayoutBuilder
B. MediaQuery.of(context).size.width
C. context.width
D. context.size
Answer: B
169. What widget is used to animate property changes implicitly?
A. Tween
B. AnimatedContainer
C. AnimatedBuilder
D. AnimatedList
Answer: B
170. What is the purpose of initState() in StatefulWidget?
A. Dispose memory
B. Declare variables
C. Initialize state before build
D. Trigger animation
Answer: C
171. Which widget provides a slider UI?
A. InputSlider
B. Slider
C. SeekBar
D. ProgressBar
Answer: B
172. What does .then() do in Futures?
A. Repeat function
B. Adds callback after completion
C. Declares type
D. Terminates app
Answer: B
173. What widget best suits creating a staggered layout?
A. Row
B. StaggeredGridView
C. Flex
D. Table
Answer: B
174. Which widget allows reordering of items?
A. Draggable
B. GestureDetector
C. ReorderableListView
D. SortableView
Answer: C
175. What does final mean in Dart?
A. Mutable
B. Constant at compile time
C. Assigned once
D. Reassignable
Answer: C
176. What package helps store key-value pairs locally?
A. shared_preferences
B. local_storage
C. flutter_secure_storage
D. hive
Answer: A
177. Which HTTP method is used to create data?
A. GET
B. PUT
C. POST
D. DELETE
Answer: C
178. What method is used to rebuild widget with animation?
A. setState
B. AnimatedSwitcher
C. animate
D. transition
Answer: B
179. What widget is useful to scroll horizontally?
A. ListView with scrollDirection
B. Row
C. GridView
D. Scrollable
Answer: A
180. What does mounted check in StatefulWidget?
A. If state is initialized
B. If widget is in widget tree
C. If app is running
D. If screen is active
Answer: B
181. What method removes focus from a TextField?
A. unfocus()
B. FocusScope.of(context).unfocus()
C. clearFocus()
D. blur()
Answer: B
182. Which function is triggered when a route is pushed?
A. initRoute
B. initState
C. build
D. didChangeDependencies
Answer: D
183. What is the default theme in Flutter?
A. Cupertino
B. Material
C. Widget
D. HTML
Answer: B
184. What is the file to define app-wide routes?
A. pubspec.yaml
B. routes.dart
C. main.dart
D. router.dart
Answer: C
185. What does runApp() do?
A. Starts animation
B. Starts Flutter app
C. Imports widgets
D. Creates splash screen
Answer: B
186. What is the correct way to handle errors in Dart?
A. catch {}
B. catchError {}
C. try-catch
D. onError()
Answer: C
187. What’s the recommended image format for Flutter assets?
A. JPG
B. PNG
C. SVG
D. WebP
Answer: B
188. Which keyword defines an asynchronous function?
A. future
B. then
C. async
D. delay
Answer: C
189. What widget helps to animate a child into view with a fade effect?
A. FadeTransition
B. FadeIn
C. FadeAnimation
D. AnimatedOpacity
Answer: D
190. How do you pass data between widgets in Flutter?
A. Global variables
B. setState
C. Constructor
D. main()
Answer: C
191. What does const keyword in constructor imply?
A. Function is immutable
B. Constructor is private
C. Widget is compile-time constant
D. Widget is public
Answer: C
192. How do you remove a screen from the navigation stack?
A. Navigator.pop()
B. Navigator.push()
C. Navigator.clear()
D. Navigator.remove()
Answer: A
193. What does required do in Dart constructors?
A. Optional
B. Default parameter
C. Forces value to be passed
D. Declares public field
Answer: C
194. Which widget groups a set of radio buttons?
A. RadioGroup
B. RadioListTile
C. RadioColumn
D. CheckBox
Answer: B
195. What Flutter widget creates a web view?
A. WebViewer
B. WebView
C. flutter_webview_plugin
D. webview_flutter
Answer: D
196. What does Padding widget do?
A. Adds space outside
B. Adds space inside
C. Adds margin
D. Adds border
Answer: B
197. Which package provides custom icons?
A. icons_plus
B. font_awesome_flutter
C. custom_icons
D. icon_theme
Answer: B
198. How to animate list additions/removals?
A. ListBuilder
B. AnimatedList
C. DynamicList
D. ReorderableListView
Answer: B
199. Which Flutter class is best suited for JSON deserialization?
A. HttpService
B. Factory constructor with fromJson
C. FutureBuilder
D. MapBuilder
Answer: B
200. What does await do in Dart?
A. Runs in background
B. Waits for Future to complete
C. Skips function
D. Declares delay
Answer: B

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy