Complete the code to apply a theme color to the app's background.
MaterialApp(
theme: ThemeData(
scaffoldBackgroundColor: [1],
),
home: Scaffold(),
)Colors.blueGrey is a valid Flutter color constant for theming.
Complete the code to set the primary color in the theme.
ThemeData(
primaryColor: [1],
)Colors.purple is a good choice for primaryColor to keep UI consistent.
Fix the error in the code to apply text theme color.
ThemeData(
textTheme: TextTheme(
bodyText1: TextStyle(color: [1]),
),
)Colors.white is a valid color for text, ensuring readability on dark backgrounds.
Fill both blanks to create a consistent button style in the theme.
ThemeData(
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: [1],
foregroundColor: [2],
),
),
)Using deepOrange as background and white as foreground creates clear, consistent buttons.
Fill all three blanks to define a consistent app bar theme.
ThemeData(
appBarTheme: AppBarTheme(
backgroundColor: [1],
iconTheme: IconThemeData(color: [2]),
titleTextStyle: TextStyle(color: [3], fontSize: 20),
),
)Indigo background with white icons and title text ensures a consistent, readable app bar.
