NewWork mode: your Claude Code or Codex on work calls, answering from your project's codeSkip to content

Quiz: Flutter

Flutter questions from real interviews as a quiz, with an explanation for every option.

32 questionsAll topicsFlutter

Try it: 5 questions

Loading…

Sample questions

  1. What is the Semantics Tree used for in Flutter?

    • To store and restore widget state when the UI rebuilds
    • To expose the structure and meaning of UI elements to assistive technologies
    • To determine the order in which widgets are painted on top of one another
    • To associate widgets with the app's navigation routes
    Full answer
  2. Here, R means a function’s return value. How does it differ from an exception in Dart?

    • R and exceptions both stop the function, but they are handled using different variable types.
    • R is used only for successful results, while exceptions are used only for compile-time errors.
    • R automatically transfers control to catch, while an exception is returned to the caller as a normal value.
    • R is returned as a normal result, while an exception interrupts the normal flow and transfers control to a handler.
    Full answer
  3. Which three Flutter tools or features directly help profile and observe an app’s performance?

    • Flutter DevTools, including Performance View and CPU Profiler
    • Widget Inspector for measuring function execution time
    • Performance Overlay, which displays frame-rendering metrics
    • Custom events added with the Timeline API
    • Debug mode as the primary mode for benchmarking
    Full answer
  4. Which statements about the Container widget and its properties are correct? Select all that apply.

    • transform affects only the child widget, not the container.
    • alignment positions the Container itself relative to its parent.
    • Container can add styling and spacing around a child widget.
    • decoration supports richer styling, but color cannot be set separately alongside it.
    • padding sets inner spacing, while margin sets outer spacing.
    Full answer
  5. When is it appropriate to use const in Dart/Flutter?

    • When the variable should receive its value only on first access
    • When the value is known at compile time and does not need to change
    • When the object needs to be modified after it is created
    • When the value is computed each time the app runs
    Full answer
  6. Which statements correctly describe generations in Dart garbage collection?

    • Dart has an explicit Permanent Generation for metadata.
    • The young generation holds recently created objects and is usually collected frequently.
    • The old generation is collected more often than the young generation because it contains more objects.
    • Objects that survive several young-generation collections may be promoted to the old generation.
    • All objects start in the old generation and may later move to the young generation.
    Full answer
  7. How are REST requests typically handled in Flutter?

    • Receive ready-made Dart objects because Flutter sends the request and converts JSON automatically.
    • Use dart:convert to send the HTTP request and treat any received response as successful.
    • Add http or dio, make the request asynchronously, check the response, and handle JSON and errors.
    • Make the request synchronously on the main isolate and parse the response manually.
    Full answer
  8. Why would you override dispose() in a Flutter State class?

    • To preserve the widget's state across recreations and restore it later.
    • To manually remove the widget from the tree and trigger its rebuild.
    • To run background cleanup after every widget rebuild.
    • To release resources not managed by the garbage collector, such as controllers and subscriptions.
    Full answer
  9. Which description of a service locator in Flutter is the most accurate?

    • A factory that must create a new service instance on every request.
    • A state store that rebuilds widgets when its data changes.
    • A mechanism that automatically passes dependencies into an object through its constructor.
    • A central registry where services are registered and then retrieved on request, for example by type.
    Full answer
  10. Which statement best describes an Isolate in Dart/Flutter?

    • An asynchronous waiting mechanism that runs tasks in the same UI Isolate.
    • An independent unit of execution with its own memory that communicates through ports.
    • A thread that directly accesses memory shared with other threads.
    • A Flutter component responsible for building and displaying widgets.
    Full answer