0
0
Fluttermobile~20 mins

Flutter project structure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Flutter Project Structure Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the purpose of the lib folder
In a Flutter project, what is the main purpose of the lib folder?
AIt stores all the image and font assets used in the app.
BIt contains the Dart source code files for the app's logic and UI.
CIt holds the configuration files for Android and iOS platforms.
DIt contains the build output files after compiling the app.
Attempts:
2 left
💡 Hint
Think about where you write your app's main code.
ui_behavior
intermediate
2:00remaining
Effect of modifying pubspec.yaml assets section
What happens if you add image files to the assets section in pubspec.yaml but forget to place those files in the correct folder?
AThe app will ignore the assets section and load images from the internet.
BThe app will automatically create the missing image files.
CThe app will crash at runtime when trying to load the images.
DThe app will build successfully but show errors or blank spaces where images should appear.
Attempts:
2 left
💡 Hint
Think about what happens when the app cannot find a file it expects.
lifecycle
advanced
2:00remaining
Role of main.dart in Flutter project
What is the role of the main.dart file inside the lib folder in a Flutter project?
AIt holds the Android-specific configuration for the app.
BIt stores the app's theme and color definitions only.
CIt contains the entry point function <code>main()</code> that starts the app.
DIt is used to store all the app's image assets.
Attempts:
2 left
💡 Hint
Where does the app start running?
navigation
advanced
2:00remaining
Where to define routes in Flutter project structure
In a well-organized Flutter project, where is the best place to define app navigation routes?
AInside the main.dart file or a dedicated routes.dart file in the lib folder.
BIn the android/app/src folder alongside AndroidManifest.xml.
CIn the ios/Runner folder with the Info.plist file.
DInside the pubspec.yaml file under dependencies.
Attempts:
2 left
💡 Hint
Routes are part of app logic and UI, not platform config.
🔧 Debug
expert
2:00remaining
Identifying cause of build failure due to missing Android folder
You cloned a Flutter project but the android folder is missing. What will happen when you try to build the app for Android?
AThe build will fail because platform-specific files are missing.
BThe app will build and run normally on Android devices.
CFlutter will automatically recreate the android folder during build.
DThe app will build but crash immediately on Android devices.
Attempts:
2 left
💡 Hint
Think about what files are needed to build for Android.