Top 30 Easy Flutter & Dart Concepts Quiz for Beginners
30 easy multiple-choice Flutter & Dart concept questions, the vocabulary and first principles, the parts you need before anything else makes sense. They come from 30 bites in the Flutter & Dart library, the gentlest slice of the 167 Flutter & Dart concept questions in the library. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.
Flutter framework, Dart language, packages, Impeller
30 questions. Pick an answer, or open “Show the answer” to read it.
Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.
Question 1 of 30
Which keyword is best for a variable initialized at runtime from an API call, never to change?
Show the answer
Answer: a · final
The 'final' keyword is used for variables whose values are determined at runtime and assigned once, making them immutable thereafter. 'const' is incorrect because it requires the value to be known at compile-time, which is not the case for an API response.
Question 2 of 30
What is a direct consequence of Dart's principle that "everything is an object"?
Show the answer
Answer: c · Even basic data types like integers and strings have callable methods.
The core idea is that even simple types like int and String are objects, meaning they come with built-in methods and properties, unlike primitive types in other languages. Dart does not have primitive types that need conversion; all values are objects from the start, and 'null' itself is an object of type 'Null'.
Read the full bite: Dart's Core Data Types: Everything is an Object
Question 3 of 30
What is the primary reason for using control flow statements in a program?
Show the answer
Answer: a · To allow the program to make decisions and repeat actions based on conditions.
The card explains that control flow allows programs to "react to different inputs, repeat tasks, and handle problems," which directly translates to making decisions and repeating actions. Defining reusable code blocks (functions) is a separate concept, even though functions often contain control flow.
Read the full bite: Dart's Control Flow: Telling Your Code What to Do Next
Question 4 of 30
What is the primary characteristic that makes Dart's arrow function syntax (=>) suitable for a function?
Show the answer
Answer: a · It implicitly returns the result of a single, concise expression.
Arrow syntax is designed for functions that compute and return the result of a single expression, implicitly handling the return. Options A and B describe scenarios where a block body function is required, while option D incorrectly states that arrow syntax requires an explicit return keyword.
Read the full bite: Dart Function Syntax: Block Body vs. Arrow Notation
Question 5 of 30
Which statement accurately describes a limitation of static methods in Dart?
Show the answer
Answer: b · They cannot use the 'this' keyword or access instance-specific data.
Static methods belong to the class, not an individual instance. Therefore, they cannot refer to instance-specific data or the 'this' keyword, which points to the current instance. Option D is incorrect because static methods are called directly on the class, without needing an instance.
Read the full bite: Static Members: Belong to the Class, Not the Instance
Question 6 of 30
Which statement best describes the primary function of the Dart event loop?
Show the answer
Answer: b · It manages the sequential execution of asynchronous operations and user input on a single thread, ensuring the UI remains responsive.
The card explicitly states the event loop is a "single-threaded task manager" whose purpose is "to keep a user interface responsive" by processing events "one at a time." Option B accurately reflects this. Option C is incorrect because the event loop is single-threaded; heavy CPU tasks require spawning a new Isolate, not parallel execution by the event loop itself.
Read the full bite: The Dart Event Loop: Your App's Task Manager
Question 7 of 30
In Dart, when chaining multiple .then() calls on a Future, what value is typically passed as an argument to a subsequent .then() callback?
Show the answer
Answer: a · The result returned by the immediately preceding .then() callback.
The card states, "You can chain multiple .then() calls, passing the result of one to the next." This means each .then() receives the successful outcome of the previous step. Option B is incorrect because error handling is managed by .catchError(), not .then().
Read the full bite: Dart Futures: Chaining Async Work with .then()
Question 8 of 30
Which statement accurately describes the fundamental approach of Declarative UI?
Show the answer
Answer: d · The UI is defined by describing its desired appearance and structure for any given application state.
Declarative UI focuses on describing the 'what'—the desired UI state for given data—rather than the 'how'—the step-by-step instructions for modifying UI elements. Option C describes the imperative approach, which Declarative UI aims to replace.
Read the full bite: Declarative UI: Describe the 'What', Not the 'How'
Question 9 of 30
What is the primary role of runApp() in a Flutter application's lifecycle?
Show the answer
Answer: a · To establish the root widget and initialize the UI rendering pipeline.
runApp() serves as the single entry point, taking your root widget and connecting it to the device's screen to bootstrap the entire UI rendering process. Managing individual widget state is handled by setState within StatefulWidget, not by runApp().
Read the full bite: runApp(): The Entry Point to Your Flutter UI
Question 10 of 30
In Flutter's 'everything is a widget' paradigm, which of the following is typically represented as a widget?
Show the answer
Answer: c · A button's visual appearance, its padding, and its tap handler.
Flutter uses widgets for all UI elements, including visible components, styling (like padding), and interaction handlers. Non-UI logic, such as network requests, data models, or business logic like authentication, should reside outside the widget tree.
Question 11 of 30
Which scenario is the most appropriate use case for a Flutter StatelessWidget?
Show the answer
Answer: d · An icon that displays a specific image based on a fixed asset path provided at creation.
A StatelessWidget is designed for UI that is configured once and does not change internally, like an icon with a fixed image. Options A, B, and D describe UI elements that require internal state changes (score updates, toggle states, animation progress), which necessitate a StatefulWidget.
Read the full bite: StatelessWidget: Flutter's Immutable UI Blueprint
Question 12 of 30
A common beginner mistake is placing a long Text widget directly inside a Row, causing an overflow. What is the standard Flutter solution to ensure the Text adapts to the remaining horizontal space?
Show the answer
Answer: b · Wrap the Text widget in an Expanded widget.
The card explicitly states that wrapping a long Text widget in an Expanded widget is the solution to prevent overflow within a Row, allowing it to fill the remaining horizontal space. Option D is incorrect because SingleChildScrollView is for scrollable content, not for making a Text widget adapt to available space within a non-scrolling Row.
Read the full bite: Row and Column: Arranging Widgets Without Scrolling
Question 13 of 30
In a Flutter Stack, if multiple children overlap, what primarily determines which child widget is rendered on top of the others?
Show the answer
Answer: a · The order in which the child widgets are listed in the Stack's children array.
The card states that the order of children in the list defines their painting sequence from bottom to top, meaning the last child in the list is rendered on top. While z-index is a common concept for layering in other contexts, Flutter's Stack uses list order for this purpose.
Read the full bite: Flutter's Stack: Layering Widgets on Top of Each Other
Question 14 of 30
Which statement accurately describes the behavior when a Flutter Container widget has both its color and decoration properties set?
Show the answer
Answer: d · The application will encounter an error, as these properties are mutually exclusive.
The card explicitly states that 'you cannot use the color and decoration properties at the same time.' This implies that attempting to set both will result in an error, as they are mutually exclusive. If both are needed, the color should be included within the BoxDecoration.
Read the full bite: Flutter's Container: The Ultimate Box Widget
Question 15 of 30
In a Flutter Row with an Icon, a Text widget, and another Icon, which widget should wrap the Text to ensure it fills all available space between the icons?
Show the answer
Answer: b · Expanded
Expanded is specifically designed to be greedy and force its child to fill all available remaining space within a Row or Column. Flexible, by default, only expands if necessary and does not guarantee filling all space if the child's natural size is smaller.
Read the full bite: Expanded & Flexible: Claiming Space in Flutter Layouts
Question 16 of 30
Which scenario best describes an appropriate use case for SingleChildScrollView?
Show the answer
Answer: d · Creating a user profile page with several fixed sections that might overflow on small screens.
SingleChildScrollView is designed for a single, coherent piece of content that usually fits but needs a scroll fallback for smaller screens, like a complex profile page. It is not suitable for long lists or performance optimization of many off-screen widgets because it renders its entire child tree at once.
Read the full bite: SingleChildScrollView: When One Widget Needs to Scroll
Question 17 of 30
When two GestureDetector widgets are nested, each with an onTap callback, and the inner widget is tapped, which callback fires?
Show the answer
Answer: b · Only the onTap callback of the innermost GestureDetector will execute.
The card explicitly states that when GestureDetectors are nested, only the innermost detector's callback for a given gesture will fire, as it 'wins' the gesture arena. The outer detector's callback is ignored, making option D incorrect.
Read the full bite: GestureDetector: Making Any Widget Interactive
Question 18 of 30
Which Flutter Material button is best for a 'Cancel' action in a confirmation dialog?
Show the answer
Answer: d · TextButton
TextButton is recommended for low-stakes or tertiary actions like 'Cancel' to guide user attention away from it. ElevatedButton is reserved for the single most important action, and using it for 'Cancel' would be visually misleading.
Question 19 of 30
Which critical step is required when using a TextEditingController with a TextField in a StatefulWidget?
Show the answer
Answer: c · Calling controller.dispose() in the StatefulWidget's dispose method.
The card explicitly states, "You must call controller.dispose() in your StatefulWidget's dispose method to prevent memory leaks." Option A is incorrect because the controller is passed to the TextField's controller property, not its onChanged callback, which receives the current text string.
Read the full bite: Flutter's TextField: Capturing User Input
Question 20 of 30
Which task most clearly requires the use of a TextEditingController?
Show the answer
Answer: d · Implementing a character counter that updates a separate display widget as the user types.
The TextEditingController is essential for programmatically accessing and reacting to a TextField's content, as shown in the character counter example where it reads text length on every keystroke. Simple formatting like uppercase conversion is typically handled more efficiently by a TextInputFormatter.
Read the full bite: TextEditingController: Syncing UI and Code for Text Fields
Question 21 of 30
What is a common reason an InkWell's visual splash effect might not be seen upon tapping?
Show the answer
Answer: a · An opaque widget is positioned between the InkWell and its ancestor Material widget.
The card explicitly states that "The splash won't appear if an opaque widget is between it" and details how an opaque widget like a colored Container can hide the splash, which is painted on the ancestor Material. While an undefined onTap (option D) would prevent the splash from being triggered, the card's 'footgun' example specifically addresses the splash being hidden despite a tap occurring.
Question 22 of 30
What is the primary function of MaterialPageRoute in Flutter navigation?
Show the answer
Answer: d · To provide platform-specific animations for full-screen transitions.
MaterialPageRoute is designed to wrap a new screen widget and define its platform-specific transition, such as a slide on iOS or a zoom on Android. It is explicitly stated not to be used for temporary UI elements like dialogs or for managing individual widget state.
Read the full bite: MaterialPageRoute: The Page in Your Navigator Stack
Question 23 of 30
Which scenario best illustrates an appropriate use case for Flutter's imperative navigation?
Show the answer
Answer: b · Navigating from a list of products to a specific product's detail page.
Imperative navigation, using a push/pop stack model, is ideal for simple, linear flows like a master-detail pattern (list-to-detail). Options A, B, and D describe complex or non-linear scenarios where declarative routing solutions are generally preferred due to the limitations of imperative navigation.
Read the full bite: Imperative Navigation: Pushing and Popping Screens
Question 24 of 30
What is a key benefit of using named routes in a Flutter application, especially as it grows?
Show the answer
Answer: d · It allows for a more centralized and maintainable way to manage navigation paths across the entire app.
The card emphasizes that named routes centralize navigation logic, making it easier to manage in growing apps and providing a high-level view of the app's structure. While named routes can facilitate passing data, direct Navigator.push can also pass arguments, so it's not the primary differentiating benefit.
Read the full bite: Flutter Named Routes: Navigate with Strings, Not Widgets
Question 25 of 30
Why does passing data through Flutter named route arguments risk a runtime crash?
Show the answer
Answer: b · Arguments cross the navigation boundary as untyped objects requiring manual casts
The card states that route arguments are treated as generic objects, so the compiler cannot enforce type safety across the navigation boundary and an incorrect manual cast causes a runtime exception. Option D is wrong because the Navigator accepts any object, including custom models and maps.
Read the full bite: Passing Arguments to Flutter Named Routes
Question 26 of 30
When using ChangeNotifierProvider, what is the key distinction between its create factory and its .value constructor?
Show the answer
Answer: d · The create factory is for providing a new object instance that Provider manages, while the .value constructor is for providing an existing object instance managed externally.
The card states that the create factory is for newly created objects that Provider will manage and dispose of, while the .value constructor is for existing objects managed elsewhere. Option A is incorrect because both can be used with context.watch to trigger rebuilds.
Read the full bite: Provider: Pass Data Down Your Widget Tree
Question 27 of 30
Which operation will NOT trigger a notification from a ValueNotifier?
Show the answer
Answer: b · Modifying an element within a Map held by notifier.value
The correct answer is C because modifying an element within a Map is a mutation of the existing object, not a replacement of the Map itself. ValueNotifier only notifies when its value property is assigned a new object, not when the contents of the existing object are changed. Options A, B, and D all involve assigning a new object to the value property, which triggers a notification.
Read the full bite: ValueNotifier: Notifies on Replacement, Not Mutation
Question 28 of 30
For an application making many requests to the same API, which `http` package approach is best for efficiency and resource management?
Show the answer
Answer: d · Instantiate `http.Client` once, use it for all requests, and call `client.close()` when finished.
Option D is correct because `http.Client` manages a persistent connection, which is more efficient for multiple requests to the same server. Calling `client.close()` is crucial to release resources and prevent leaks. Option A is incorrect because top-level functions create new connections for each request, making them less efficient for many requests to the same API.
Read the full bite: Dart's `http` Package: Simple Requests vs. Composable Clients
Question 29 of 30
When using `jsonDecode` from `dart:convert` on a JSON string representing a single object, what is the direct return type?
Show the answer
Answer: d · A Map<String, dynamic> containing the JSON data.
The card states that `jsonDecode` typically results in a `Map<String, dynamic>` for JSON objects. It explicitly mentions that it does not return your custom class directly, which is a common misconception for beginners.
Question 30 of 30
When is manual JSON serialization using `fromJson` and `toJson` methods the most suitable approach?
Show the answer
Answer: b · When you need to quickly prototype a small application or process JSON with an unusual format.
Option B is correct because the card states manual serialization is "perfect for small projects, quick prototypes, or when you need to handle oddly-structured JSON." Option D is incorrect as manual serialization is prone to runtime errors from misspelled keys, a problem code generation aims to solve.
Read the full bite: Manual JSON Serialization with fromJson/toJson
Could you explain these out loud?
That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.