Challenge - 5 Problems
Obfuscation and Optimization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ ui_behavior
intermediate2:00remaining
How does code obfuscation affect Flutter app debugging?
You have enabled code obfuscation in your Flutter app build. What is the most likely effect on debugging the app?
Attempts:
2 left
💡 Hint
Think about what obfuscation does to code names and how that affects error messages.
✗ Incorrect
Obfuscation renames variables and methods to short, unreadable names. This makes stack traces harder to read unless you use symbol files to map back to original names.
🧠 Conceptual
intermediate2:00remaining
What is the main purpose of Flutter code optimization?
Why do developers optimize Flutter code before releasing an app?
Attempts:
2 left
💡 Hint
Think about what users want from an app in terms of speed and size.
✗ Incorrect
Optimization reduces the app size and improves performance, which helps the app run faster and use less battery.
📝 Syntax
advanced2:00remaining
Which Flutter build command enables code obfuscation and tree shaking?
Select the correct Flutter command to build an Android release APK with code obfuscation and tree shaking enabled.
Attempts:
2 left
💡 Hint
Obfuscation is only available in release builds and requires a path for debug info.
✗ Incorrect
The correct command uses --release for release build, --obfuscate to enable obfuscation, and --split-debug-info to save symbol files for debugging.
❓ lifecycle
advanced2:00remaining
How does tree shaking optimize Flutter app size?
What does tree shaking do during Flutter app compilation?
Attempts:
2 left
💡 Hint
Think about how unused code affects app size.
✗ Incorrect
Tree shaking analyzes the code and removes parts that are never used, reducing the app size.
🔧 Debug
expert2:00remaining
What error occurs if you use obfuscation without providing --split-debug-info?
You run: flutter build apk --release --obfuscate without --split-debug-info. What happens?
Attempts:
2 left
💡 Hint
Obfuscation requires symbol files to map obfuscated names back.
✗ Incorrect
Flutter requires the --split-debug-info option to specify where to save symbol files when obfuscation is enabled. Without it, the build fails.