Complete the code to set the primary color of the app theme to blue.
ThemeData(
primaryColor: Colors.[1],
)The primaryColor property sets the main color for the app's theme. Using Colors.blue sets it to blue.
Complete the code to set the background color of the scaffold to white using ThemeData.
ThemeData(
scaffoldBackgroundColor: [1],
)Colors.white.The scaffoldBackgroundColor property sets the background color of Scaffold widgets. Setting it to Colors.white makes the background white.
Fix the error in the code to correctly set the text theme's headline1 color to red.
ThemeData(
textTheme: TextTheme(
headline1: TextStyle(color: Colors.[1]),
),
)Colors.red.The headline1 style in TextTheme controls the style of large headings. Setting its color to Colors.red changes the text color to red.
Fill both blanks to create a ThemeData with primarySwatch blue and brightness dark.
ThemeData( primarySwatch: Colors.[1], brightness: Brightness.[2], )
The primarySwatch sets a color palette for the app, and brightness controls light or dark mode. Using Colors.blue and Brightness.dark sets a blue theme with dark mode.
Fill all three blanks to define a ThemeData with accentColor amber, fontFamily Roboto, and buttonColor green.
ThemeData( accentColor: Colors.[1], fontFamily: '[2]', buttonColor: Colors.[3], )
The accentColor sets the highlight color, fontFamily sets the app's font, and buttonColor sets the default button color. Using Colors.amber, Roboto, and Colors.green applies these styles.