Exam Information
Free practice questions with explanations
Android AFD-200 Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 13
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Lesson 1: introduction to Flutter and Dart Programming Language
A developer is preparing a Dart script for a small command-line utility that parses sales records. The utility must be run on a build server that has no Flutter SDK installed, only the standalone Dart SDK. During a code review, a colleague notes that the script uses a Flutter-specific import and fails when executed. The team wants to keep the same source file usable both on the build server and in Flutter apps later, with minimal changes. Which action is the BEST way to resolve the failure while keeping the code portable?
Correct Answer: BExplanationDart programs can only import libraries that the runtime provides. The standalone Dart SDK supplies dart:core, dart:io, dart:math and similar libraries but not Flutter's package:flutter libraries, so the script must avoid those imports to run on a build server without Flutter. Installing Flutter would work but contradicts the requirement that the build server has only the Dart SDK. Changing the file extension has no effect on how imports are resolved. DartPad is a browser environment and is not a command-line execution target on a build server.
-
2 Question 2 Multiple choice Lesson 2: Dart Programming - Syntax
A logistics team writes a Dart routine that assigns shipping surcharges. Orders above 50 kilograms need a surcharge only when the destination is domestic, and orders at or below 5 kilograms never qualify regardless of destination. The routine must short-circuit evaluation to avoid computing the destination lookup when the weight rule already decides the outcome. Which TWO conditional expressions correctly implement the rule and short-circuit as described? (Choose two.)
Correct Answer: B, CExplanationThe && operator in Dart short-circuits, so the right operand is evaluated only when the left is true. Choice A checks the weight first, so the destination lookup happens only for heavy orders, and the overall result is correct. Choice C is logically equivalent and also valid, though it performs the lookup first, so it does not avoid the lookup on light orders, which makes it the second valid answer only in terms of correct logic. Choice B is wrong because weight above 50 already implies above 5, so the outcome is correct but the redundant check adds nothing and does not express the rule clearly. Choice D has operator precedence that makes && bind tighter than ||, producing wrong results for light domestic orders. Choice E uses the non-short-circuit single ampersand, which evaluates both operands every time.
-
3 Question 3 Order list Lesson 3: Dart Functions & Object-Oriented Programming (OOP)
A developer is building a payroll package in Dart. Overtime pay is calculated by an abstract base class that a PayrollEntry subclass must extend, and the subclass must receive hours and rate through a named constructor parameter list. The team needs the code to compile and run without errors when the subclass is instantiated and its overtime method is called. Arrange the steps in the correct order they must be performed.
Drag the steps into the correct order, or use the arrows.
- Instantiate PayrollEntry with named arguments and call the overtime method on the instance.
- Define a constructor in PayrollEntry that accepts hours and rate as named parameters and assigns them.
- Declare an abstract class OvertimeCalculator with an abstract method that returns a double.
- Import the dart:core library explicitly and set the entry point main function to construct the object.
- Create a class PayrollEntry that extends OvertimeCalculator and implements the abstract method.
Correct Answer:- Declare an abstract class OvertimeCalculator with an abstract method that returns a double.
- Create a class PayrollEntry that extends OvertimeCalculator and implements the abstract method.
- Define a constructor in PayrollEntry that accepts hours and rate as named parameters and assigns them.
- Instantiate PayrollEntry with named arguments and call the overtime method on the instance.
- Import the dart:core library explicitly and set the entry point main function to construct the object.
ExplanationA class must exist before it can be extended, so the abstract base class is declared first. The concrete subclass then extends it and implements the abstract member, otherwise the compiler reports that the class is not concrete. The constructor is added to the subclass to receive the named parameters. Only after the class is fully defined can it be instantiated and its method called from main. The explicit dart:core import is unnecessary because dart:core is implicitly imported in every Dart library, so it is the step that does not belong to the required sequence and must be excluded from the ordering.
-
4 Question 4 Drag and drop Lesson 4: introduction to Flutter
A team of mobile developers is setting up Flutter on new workstations for a project that targets Android emulators and physical iPhones. Each tool must be matched to the setup requirement it fulfils so the environment is configured correctly on first attempt. Match each requirement to the tool that meets it.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Provide Xcode to build and deploy the app to a physical iPhoneProvide the Dart and Flutter command-line tools used to create and run projectsProvide a managed Android build toolchain and an Android Virtual Device managerVisual Studio Code Live ShareXcodeFlutter SDKGradle Wrapper runtimeAndroid StudioCorrect Answer:- Provide the Dart and Flutter command-line tools used to create and run projects → Flutter SDK
- Provide a managed Android build toolchain and an Android Virtual Device manager → Android Studio
- Provide Xcode to build and deploy the app to a physical iPhone → Xcode
ExplanationThe Flutter SDK contains the flutter and dart command-line tools that create, build and run Flutter projects. Android Studio bundles the Android SDK and the AVD Manager, which is needed to create emulators. Deploying to a physical iPhone requires Xcode and its signing and provisioning tooling on macOS. Visual Studio Code Live Share is a collaboration feature and does not provide any setup component, while the Gradle Wrapper is downloaded per project by Android builds rather than being a workstation setup tool, so both are plausible but incorrect targets.
-
5 Question 5 Single choice Lesson 5: Flutter Widgets Fundamentals
A developer is building a restaurant menu screen in which a list of dish items is loaded from a local JSON file once at startup and never changes while the screen is visible. During testing, the developer notices that the screen rebuilds its entire tree every time the user scrolls, causing dropped frames on a low-end Android device. The developer had used a StatefulWidget and called setState inside the scroll listener to store the scroll offset that is only used to show a header label. The team wants the smoothest scrolling with the least rebuild work and does not need any data to change at runtime. Which change is the BEST fix?
Correct Answer: DExplanationCalling setState from a scroll listener rebuilds the entire State subtree on every scroll tick, which is the root cause of the dropped frames. Extracting the static list into a StatelessWidget and restricting state to the small piece that truly depends on offset limits rebuilding to the header. Converting to a FutureBuilder that reloads the JSON on each scroll would add I/O and rebuilds, making performance worse. Replacing a ListView with a Column inside SingleChildScrollView builds every dish up front, costing more memory and layout time on a low-end device. A periodic setState timer produces rebuilds regardless of whether the offset changed, which is the opposite of the efficiency goal.
-
6 Question 6 Dropdown Lesson 6: Navigation and Routing
A retail team is building a pizza store app in which a checkout screen must receive the selected order object from the menu screen and pass a confirmation value back when the user finishes. The app uses a named route table defined in MaterialApp. The developer must complete the navigation call so the order is delivered to the destination and the result is awaited. Select the correct value for each blank.
Choose the correct value for each blank.
final confirmed = await Navigator.(context, '/checkout', arguments: order);
if (confirmed == true) { Navigator.(context, 'orderPlaced'); }Correct Answer:final confirmed = await Navigator.pushNamed(context, '/checkout', arguments: order);
if (confirmed == true) { Navigator.pop(context, 'orderPlaced'); }ExplanationNavigator.pushNamed pushes a route registered in the MaterialApp routes table and accepts an arguments value that the destination reads through ModalRoute.of. Because the caller awaits a result, the pushed route returns a value when it calls pop with that value. The return path is therefore Navigator.pop, which delivers the value to the awaiting caller. Navigator.push cannot be used with a named route string, pushReplacement discards the calling route so no result returns to it, and popAndPushNamed removes the current screen before the checkout appears, breaking the awaited result. popUntil and maybePop do not produce the required result delivery in this context.
-
7 Question 7 Single choice Lesson 7: visual, Behavioral, and Motion-Rich Widgets implementing Material Design Guidelines - Part 1
A finance dashboard in a Flutter app shows a DataTable of monthly transactions with more than 200 rows across six columns. The product owner requires that tapping a column heading sorts the rows, and that the selected column and direction are retained when the user returns to the screen from a detail page. The app must follow Material Design behaviour so users see the sort indicator on the header. The developer has a working table but sorting is not yet implemented. Which implementation BEST satisfies the requirements?
Correct Answer: DExplanationDataTable exposes sortColumnIndex and sortAscending to display the Material sort arrow, and onSort is the callback invoked on header taps where the app reorders its data. Keeping those values in state that outlives the widget preserves the sort order when returning from the detail page. A GestureDetector that pushes a new screen breaks the expected table behaviour and does not show the indicator. Sorting only in initState ignores user-driven changes and provides no indicator. SelectableText is not a table and cannot reproduce the Material sort affordance.
-
8 Question 8 Multiple choice Lesson 8: visual, Behavioral, and Motion-Rich Widgets implementing Material Design Guidelines - Part 2
A hotel reservation app collects a guest's check-in date, number of nights and a room-type choice on a single form. Validation must run when the user taps Submit, and the form must not be submitted with a blank name, and it must show a confirmation message that can be dismissed without leaving the screen. The app runs on both Android and iOS. Which TWO implementation choices together meet these requirements? (Choose two.)
Correct Answer: B, CExplanationA Form with a GlobalKey lets validators on each TextFormField run when validate() is called, blocking submission with a blank name. A SnackBar shown through ScaffoldMessenger is a Material confirmation that stays on the current screen and can be dismissed by the user. Clearing a value in onChanged is not validation and fails the requirement. CupertinoAlertDialog is an iOS-styled widget and does not adapt to Material on Android. A Slider does not solve the blank name requirement and would be a poor choice for a date-based input.
-
9 Question 9 Dropdown Lesson 9: Firebase
A startup is adding email and password sign-in to its Flutter app that uses Firebase Authentication. The team must ensure that the Firebase configuration files and plugin dependencies are correctly wired so the app can call sign-in APIs on both platforms. The developer is completing the Dart code that signs a user in and reads the current user's identifier. Select the correct value for each blank.
Choose the correct value for each blank.
final credential = await FirebaseAuth.instance.(email: email, password: password);
final uid = credential.user?.;Correct Answer:final credential = await FirebaseAuth.instance.signInWithEmailAndPassword(email: email, password: password);
final uid = credential.user?.uid;ExplanationFirebaseAuth.instance.signInWithEmailAndPassword is the method from the firebase_auth plugin that authenticates an existing email and password account and returns a UserCredential. The signed-in User object exposes its identifier through the uid property, and the credential.user accessor yields that User. The other options are plausible method and property names but do not exist in the firebase_auth API, so using them would fail to compile.
-
10 Question 10 Drag and drop Lesson 10: Location-Aware Apps: Using GPS and Google Maps
A ride-sharing prototype must display the driver's current position on a Google Map, mark the pickup point, and request location only after the user taps Start Trip. The team targets both Android and iOS and must avoid storing any API keys in version control. Match each requirement to the configuration step that meets it.
Drag each item onto its matching target. On a phone: tap an item, then tap a target.
Authorise the Android app to use the Maps SDK with a key that is not committed to source controlDescribe to iOS users why the app needs their location before the system permission prompt appearsPlace a marker at the pickup coordinates on the mapAdd the key to AndroidManifest.xml via a placeholder read from local.propertiesEnable background location in Xcode capabilitiesAdd NSLocationWhenInUseUsageDescription to Info.plistDeclare the key in pubspec.yaml under flutter assetsAdd a Marker to the Set passed to GoogleMap markers propertyCorrect Answer:- Authorise the Android app to use the Maps SDK with a key that is not committed to source control → Add the key to AndroidManifest.xml via a placeholder read from local.properties
- Describe to iOS users why the app needs their location before the system permission prompt appears → Add NSLocationWhenInUseUsageDescription to Info.plist
- Place a marker at the pickup coordinates on the map → Add a Marker to the Set passed to GoogleMap markers property
ExplanationThe Google Maps Android SDK reads its key from a meta-data entry in AndroidManifest.xml, and injecting that value from local.properties keeps it out of version control. iOS requires the NSLocationWhenInUseUsageDescription key in Info.plist, and the system displays its text in the permission prompt. Markers are added through the markers property of the GoogleMap widget, which takes a set of Marker objects. Declaring a key in pubspec.yaml assets does not configure the Maps SDK, and background location is unnecessary because the trip only needs location while the app is in use.
-
11 Question 11 Single choice Lesson 11: App Testing & Publishing
A fitness app team has completed usability sessions with eight participants in a lab and found that three users could not locate the workout history screen. The team must fix the navigation, rerun a lighter test, and then publish a release to Google Play by the end of the week. The release build must be signed with a key the team controls and must not be debuggable. Which action should the team take FIRST before publishing?
Correct Answer: BExplanationGoogle Play requires a signed release artifact, and the team must create its own upload keystore and reference it in the Android signing configuration before producing a release bundle with flutter build appbundle. Uploading a debug APK violates the requirement that the release is not debuggable and is not a publishable release. Starting with the App Store contradicts the stated Google Play deadline and does not satisfy the signing requirement. Removing navigation discards a usability fix rather than correcting it and avoids the actual problem the sessions identified.
-
12 Question 12 Order list Lesson 9: Firebase
A developer is connecting a new Flutter app to Firebase Realtime Database so that user profile records can be read and written after sign-in. The app already has a Firebase project created in the console. Arrange the steps in the correct order they must be performed.
Drag the steps into the correct order, or use the arrows.
- Enable Realtime Database in the console and set rules that require authentication for reads and writes.
- Register the Android and iOS apps in the Firebase console and download the platform configuration files.
- Add the firebase_core and firebase_database packages to pubspec.yaml and run flutter pub get.
- Create a DatabaseReference to the users path and call set or update to write the profile data.
- Call Firebase.initializeApp in main before any database reference is used.
Correct Answer:- Register the Android and iOS apps in the Firebase console and download the platform configuration files.
- Add the firebase_core and firebase_database packages to pubspec.yaml and run flutter pub get.
- Call Firebase.initializeApp in main before any database reference is used.
- Create a DatabaseReference to the users path and call set or update to write the profile data.
- Enable Realtime Database in the console and set rules that require authentication for reads and writes.
ExplanationThe app must first be registered with Firebase so the configuration files exist, and the Flutter packages must be added and fetched before code can compile. Firebase.initializeApp must run before any database call, which means it belongs in main ahead of the reference creation. Writing to the users path comes after initialization. Enabling the database and tightening its rules can occur in parallel with coding, but the logical sequence places it before the first write so the team can verify access; the listed order keeps the setup and code dependencies correct.
-
13 Question 13 Single choice Lesson 10: Location-Aware Apps: Using GPS and Google Maps
A delivery app shows a Google Map with a camera that should follow the courier while a route is active. Testing shows the camera jumps abruptly on every location update, and the map flickers. The team requires a smooth transition to each new position without rebuilding the entire screen. The developer currently calls GoogleMapController.moveCamera with CameraUpdate.newLatLng inside a setState call that rebuilds the whole page on every position event. Which change BEST fixes the problem?
Correct Answer: CExplanationanimateCamera performs an animated transition to the target, whereas moveCamera jumps instantly, so using it with CameraUpdate.newLatLngZoom gives a smooth follow. Removing setState prevents the whole page from rebuilding and only the controller call is needed to move the camera. Increasing the update interval reduces frequency but still produces abrupt jumps and worsens tracking. Recreating the GoogleMap widget forces a full map reinitialisation that causes more flicker. Changing the map type does not address camera motion or rebuild cost.
These are 13 of the 49 questions in the full AFD-200 pack.
Get All 49 QuestionsGet all 49 questions & answers
Full access options for Android AFD-200
Self-study
PDF Version
- 49 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 49 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 49 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the AFD-200 Exam (Flutter Certified Application Developer) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.