Recall & Review
beginner
What is dark mode in mobile apps?
Dark mode is a color scheme that uses dark backgrounds and light text to reduce eye strain and save battery life on devices with OLED screens.
Click to reveal answer
beginner
How do you enable dark mode support in a Flutter app?
You provide both light and dark ThemeData in the MaterialApp widget using the theme and darkTheme properties, and set themeMode to ThemeMode.system to follow the device setting.
Click to reveal answer
intermediate
What Flutter widget helps detect if the app is in dark mode?
The MediaQuery widget provides platformBrightness, which tells if the current theme is light or dark.
Click to reveal answer
intermediate
Why is it important to test your app in both light and dark modes?
Because colors and contrast can look very different, testing ensures text is readable and UI elements are clear in both modes for better user experience.
Click to reveal answer
intermediate
How can you customize colors for dark mode in Flutter?
Define separate color values in your dark ThemeData, such as backgroundColor and textTheme, to create a distinct look that suits dark mode.
Click to reveal answer
Which Flutter property sets the app to follow the system dark mode setting?
✗ Incorrect
Setting themeMode to ThemeMode.system makes the app use the device's dark or light mode automatically.
What does MediaQuery.of(context).platformBrightness return?
✗ Incorrect
platformBrightness tells if the device is currently using light or dark mode.
Why should you avoid hardcoding colors in your Flutter app for dark mode?
✗ Incorrect
Hardcoded colors might not contrast well in dark mode, making text or UI elements hard to see.
Which Flutter widget is commonly used to apply themes across the app?
✗ Incorrect
MaterialApp provides theme and darkTheme properties to apply themes app-wide.
What is a benefit of dark mode for users?
✗ Incorrect
Dark mode reduces eye strain especially in dark environments and can save battery on OLED screens.
Explain how to implement dark mode support in a Flutter app.
Think about how Flutter lets you define different themes and how to switch between them automatically.
You got /3 concepts.
Describe why testing your app in both light and dark modes is important.
Consider how colors and visibility change between modes.
You got /4 concepts.