Limited-Time Offer: Enjoy 50% Savings! Coupon code: 50OFF Use it at checkout
Skip to content

Free Android Flutter Certified Application Developer AFD-200 Exam Questions

Last updated: · 10 practice questions with answers and explanations

Page: 1 / 9 Total 49 questions

Want more questions? Get Premium Access.

Question 1

New Single answer

Topic: Lesson 1: introduction to Flutter and Dart Programming Language

Skill tested: Applies Dart variable types and inference when representing values with different data types.

A small Dart command-line utility reads a quantity from a text source and calculates an estimated cost. The source returns a String, while the calculation requires a numeric value. The program should keep the quantity read from the source unchanged, reject input that cannot be parsed, and avoid weakening type safety by storing unrelated values in a dynamically typed variable. Which implementation best meets these requirements?

Correct Answer: C. Parse the String to an int, handle a failed parse, and store the parsed result separately from the original String.
Explanation:

Parsing the source String into a separate int preserves the original input and gives the calculation a statically checked numeric value. The program should account for parsing failure, for example by using int.tryParse and handling a null result. A dynamic variable in A bypasses useful compile-time checks, and multiplication will not convert arbitrary strings automatically. B attempts an invalid assignment because Dart does not implicitly convert String to int. D performs string-oriented operations rather than numeric calculation.

Question 2

New Multiple answers

Topic: Lesson 2: Dart Programming - Syntax

Skill tested: Uses conditional logic and loop control to validate input and terminate a Dart menu loop.

A pizza-ordering console program repeatedly displays a menu until the customer chooses to finish. Each selection must be checked before the program processes it; invalid selections should display an error and return to the menu, while the finish selection should end the loop without processing an order. The implementation should not use a loop that executes its body only after checking the condition, because the menu must appear at least once. Select TWO actions that together best satisfy these requirements.

Correct Answer: B. Use a do-while loop to show the menu at least once and repeat while the selection is not the finish value.; D. Use a switch statement to handle known selections, with a default branch that reports invalid input and continues the loop.
Explanation:

A do-while loop evaluates its condition after the body, so the menu is displayed at least once and can repeat until the finish value is chosen. A switch can distinguish valid selections, report unexpected values in its default branch, and leave the loop running for another selection. B may prevent the menu from appearing before a valid value exists. D confuses invalid input with the explicit finish selection. E would terminate the loop after a valid choice rather than continuing to accept orders.

Question 3

New Single answer

Topic: Lesson 3: Dart Functions & Object-Oriented Programming (OOP)

Skill tested: Designs Dart classes with constructors, private state, and getters for controlled object access.

A payroll utility represents an employee's overtime hours and hourly rate. The rate must be supplied when an employee object is created, and callers may read the computed overtime payment but must not directly modify the rate. Different employee records should keep independent values. Which class design best fits these requirements using Dart's object-oriented features?

Correct Answer: C. Create a class with constructor-initialized fields and expose the payment calculation through a method or getter, keeping the rate non-public.
Explanation:

A class instance provides independent state for each employee. A constructor can require the rate at creation, while Dart library privacy conventions allow a field such as _rate to remain inaccessible outside its library. A getter or method can expose the calculated payment without allowing callers to assign to the underlying rate. A uses shared mutable state, C provides no suitable representation, and D exposes mutable fields and relies on callers to keep derived data consistent.

Question 4

New Single answer

Topic: Lesson 4: introduction to Flutter

Skill tested: Chooses Flutter widget composition and MaterialApp configuration for a runnable application screen.

A team is creating a simple Android-facing Flutter app with a Material Design interface. The initial screen needs an app bar and a body, and the team wants to run it in an Android emulator from its Flutter project. A developer has written a widget that returns a Scaffold but has not yet made it the application's root or configured the app's Material structure. What is the most appropriate implementation?

Correct Answer: C. Call runApp with a MaterialApp whose home is the screen widget that builds the Scaffold.
Explanation:

A Flutter application starts by passing its root widget to runApp. MaterialApp supplies the Material app-level structure, including commonly used navigation and theme facilities, and its home can be the screen widget that returns a Scaffold. The Scaffold provides the standard page layout regions such as appBar and body. A does not start the Flutter widget tree, while C and D incorrectly assign Flutter widget responsibilities to the emulator or omit the required page structure.

Question 5

New Multiple answers

Topic: Lesson 5: Flutter Widgets Fundamentals

Skill tested: Selects stateful and stateless widgets and layout composition for changing interface data.

A restaurant menu screen displays a fixed restaurant title and a list of dishes. A user can tap a control to increase the number of dishes shown; the new count must update the interface without navigating away. The title never changes during the screen's lifetime. The layout must place the title above the menu, and the team wants to use Flutter's normal state-driven rebuild approach rather than manually changing rendered pixels. Select TWO design decisions that meet the requirements.

Correct Answer: B. Use a Column to arrange the title and menu vertically, with suitable child widgets for each region.; D. Implement the changing menu screen as a StatefulWidget and call setState when the displayed count changes.
Explanation:

A StatefulWidget is appropriate because the visible menu count changes in response to user interaction; calling setState updates the state and schedules a rebuild. A Column arranges its children vertically, matching the title-above-menu requirement. B mutates a build-local variable that is not durable widget state and does not reliably trigger rebuilding. A Row lays children out horizontally, and repeatedly calling runApp is not the normal way to update a screen.

Question 6

New Single answer

Topic: Lesson 6: Navigation and Routing

Skill tested: Implements named-route navigation and returns data from a subsequent Flutter screen.

A pizza app has a checkout screen that opens an address-selection screen. The address screen returns the selected address, and checkout must display it when the user comes back. The app already uses named routes for its main screens, and the team wants to preserve that route-based structure. Which approach is most appropriate?

Correct Answer: C. Push the address screen as a named route and await the navigation result; pop the address screen with the selected address as the result.
Explanation:

Flutter navigation can return a value from a route: checkout awaits the Future returned when it pushes the named route, and the address screen pops with the selected address as the result. This keeps data flow tied to the navigation interaction and fits the existing named-route design. B introduces unnecessary shared state and does not naturally wait for the user's selection. C discards the result, while D relies on inappropriate direct access to another widget's private state.

Question 7

New Multiple answers

Topic: Lesson 7: visual, Behavioral, and Motion-Rich Widgets implementing Material Design Guidelines - Part 1

Skill tested: Combines tab controller, tab views, and ListView for structured Flutter navigation and content.

A travel app screen has three categories of nearby places. Users should switch categories through tabs, and each category may contain more results than can fit on the device screen. The selected tab and its corresponding content must stay synchronized. The team wants a standard Flutter Material implementation and does not require a separate route for each category. Select TWO implementation choices that best satisfy these requirements.

Correct Answer: A. Use DefaultTabController with a TabBar and a TabBarView containing the corresponding category content.; E. Use a ListView for each category's results so the content can scroll when it exceeds the available viewport.
Explanation:

DefaultTabController coordinates the selected tab with TabBar and TabBarView without requiring the team to manage a controller manually. A ListView provides scrolling for result sets that exceed the available screen space. C overlays content rather than providing the requested tab interaction. A Drawer is a different navigation pattern, and a non-scrollable Column risks overflow. DataTable is intended for tabular data and does not provide the described tab synchronization.

Question 8

New Single answer

Topic: Lesson 8: visual, Behavioral, and Motion-Rich Widgets implementing Material Design Guidelines - Part 2

Skill tested: Selects Flutter dialog and picker interactions appropriate for transient user input and confirmation.

A hotel reservation form needs a departure date and a confirmation prompt before the user discards entered details. The date must be chosen using Flutter's platform-supported date-selection interaction, while the confirmation should block further interaction with the form until the user chooses to keep or discard the data. The team does not want to build a custom calendar or use a persistent panel. Which design best meets these needs?

Correct Answer: A. Use showDatePicker to obtain a date and show an AlertDialog for the discard decision.
Explanation:

showDatePicker presents Flutter's date-selection interaction and returns the selected date (or no selection if dismissed), avoiding a custom calendar implementation. An AlertDialog is an appropriate modal confirmation: it requires a decision before the user continues interacting with the underlying form. A SnackBar is transient and does not provide an equivalent blocking confirmation, and a TextField does not supply date-picker behavior. Slider and Switch widgets do not represent dates, while the proposed persistent sheet is unnecessary.

Question 9

New Multiple answers

Topic: Lesson 9: Firebase

Skill tested: Configures Firebase Authentication and selects a Firebase database based on synchronization requirements.

A mobile service lets users create accounts and sign in, then maintains a user profile that may be updated by the user on one device and observed promptly on another. The app must support a relational-style query over profile fields, and the team is comparing Firebase Realtime Database with Cloud Firestore. The team also needs to configure authentication rather than implementing password storage itself. Select TWO choices that best address the stated requirements.

Correct Answer: A. Enable a suitable Firebase Authentication sign-in provider and use Firebase Authentication APIs for account creation and login.; B. Choose Cloud Firestore because the stated requirement for querying profile fields fits its document and query model better than the Realtime Database's JSON tree model.
Explanation:

Firebase Authentication provides account and sign-in mechanisms, so the application should use its supported provider and APIs rather than managing passwords in application data. Cloud Firestore's document model and query capabilities are a better fit for the stated need to query profile fields; both Firestore and Realtime Database support synchronized data, but Realtime Database organizes data as a JSON tree and does not provide relational joins. C creates an unsafe and inappropriate authentication design. E confuses identity data with the app's profile database.

Question 10

New Single answer

Topic: Lesson 10: Location-Aware Apps: Using GPS and Google Maps

Skill tested: Integrates Google Maps API keys and location permissions for a Flutter location-aware screen.

A delivery app displays a Google Map and the signed-in user's current position on Android and iOS. The map appears blank on both platforms after the team added the Flutter Google Maps plugin. The app's API key was added only to the Dart source, and location permission prompts have not been configured. The release must not rely on an undocumented runtime workaround. What is the best next implementation step?

Correct Answer: A. Add the API key to the platform-specific Android and iOS map configuration, enable the required Maps SDKs for the key, and configure and request location permissions for each platform.
Explanation:

The Google Maps Flutter plugin still requires the relevant platform configuration: a valid API key must be provided for Android and iOS, and the corresponding Maps SDKs must be enabled for the key. Showing the user's position also requires location permissions to be declared and requested according to each platform's requirements. A marker cannot replace map authorization or user-location access. The plugin does not generate an API key, and asking users to enter one is neither a valid integration nor a substitute for permissions.