Reorder Theme fields and arguments to be consistently alphabetical within sections. (#104011)

This commit is contained in:
Greg Spencer 2022-05-17 20:57:08 -07:00 committed by GitHub
parent 851c9521c7
commit 08496712b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 508 additions and 464 deletions

File diff suppressed because it is too large Load Diff

View File

@ -616,86 +616,96 @@ void main() {
); );
final ThemeData theme = ThemeData.raw( final ThemeData theme = ThemeData.raw(
visualDensity: VisualDensity.standard, // For the sanity of the reader, make sure these properties are in the same
primaryColor: Colors.black, // order everywhere that they are separated by section comments (e.g.
primaryColorBrightness: Brightness.dark, // GENERAL CONFIGURATION). Each section except for deprecations should be
primaryColorLight: Colors.black, // alphabetical by symbol name.
primaryColorDark: Colors.black,
accentColor: Colors.black, // GENERAL CONFIGURATION
accentColorBrightness: Brightness.dark, applyElevationOverlayColor: false,
canvasColor: Colors.black, cupertinoOverrideTheme: null,
shadowColor: Colors.black, extensions: const <Object, ThemeExtension<dynamic>>{},
scaffoldBackgroundColor: Colors.black, inputDecorationTheme: ThemeData.dark().inputDecorationTheme.copyWith(border: const OutlineInputBorder()),
bottomAppBarColor: Colors.black, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
cardColor: Colors.black, pageTransitionsTheme: pageTransitionTheme,
dividerColor: Colors.black, platform: TargetPlatform.iOS,
focusColor: Colors.black, scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)),
hoverColor: Colors.black,
highlightColor: Colors.black,
splashColor: Colors.black,
splashFactory: InkRipple.splashFactory, splashFactory: InkRipple.splashFactory,
useMaterial3: false, useMaterial3: false,
selectedRowColor: Colors.black, visualDensity: VisualDensity.standard,
unselectedWidgetColor: Colors.black, // COLOR
disabledColor: Colors.black,
buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()),
toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)),
buttonColor: Colors.black,
secondaryHeaderColor: Colors.black,
backgroundColor: Colors.black, backgroundColor: Colors.black,
bottomAppBarColor: Colors.black,
canvasColor: Colors.black,
cardColor: Colors.black,
colorScheme: const ColorScheme.light(),
dialogBackgroundColor: Colors.black, dialogBackgroundColor: Colors.black,
indicatorColor: Colors.black, disabledColor: Colors.black,
hintColor: Colors.black, dividerColor: Colors.black,
errorColor: Colors.black, errorColor: Colors.black,
focusColor: Colors.black,
highlightColor: Colors.black,
hintColor: Colors.black,
hoverColor: Colors.black,
indicatorColor: Colors.black,
primaryColor: Colors.black,
primaryColorDark: Colors.black,
primaryColorLight: Colors.black,
scaffoldBackgroundColor: Colors.black,
secondaryHeaderColor: Colors.black,
selectedRowColor: Colors.black,
shadowColor: Colors.black,
splashColor: Colors.black,
toggleableActiveColor: Colors.black, toggleableActiveColor: Colors.black,
textTheme: ThemeData.dark().textTheme, unselectedWidgetColor: Colors.black,
primaryTextTheme: ThemeData.dark().textTheme, // TYPOGRAPHY & ICONOGRAPHY
accentTextTheme: ThemeData.dark().textTheme,
inputDecorationTheme: ThemeData.dark().inputDecorationTheme.copyWith(border: const OutlineInputBorder()),
iconTheme: ThemeData.dark().iconTheme, iconTheme: ThemeData.dark().iconTheme,
primaryIconTheme: ThemeData.dark().iconTheme, primaryIconTheme: ThemeData.dark().iconTheme,
accentIconTheme: ThemeData.dark().iconTheme, primaryTextTheme: ThemeData.dark().textTheme,
sliderTheme: sliderTheme, textTheme: ThemeData.dark().textTheme,
tabBarTheme: const TabBarTheme(labelColor: Colors.black), typography: Typography.material2018(),
tooltipTheme: const TooltipThemeData(height: 100), // COMPONENT THEMES
expansionTileTheme: const ExpansionTileThemeData(backgroundColor: Colors.black),
cardTheme: const CardTheme(color: Colors.black),
chipTheme: chipTheme,
platform: TargetPlatform.iOS,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
applyElevationOverlayColor: false,
pageTransitionsTheme: pageTransitionTheme,
appBarTheme: const AppBarTheme(backgroundColor: Colors.black), appBarTheme: const AppBarTheme(backgroundColor: Colors.black),
scrollbarTheme: const ScrollbarThemeData(radius: Radius.circular(10.0)), bannerTheme: const MaterialBannerThemeData(backgroundColor: Colors.black),
bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black), bottomAppBarTheme: const BottomAppBarTheme(color: Colors.black),
colorScheme: const ColorScheme.light(), bottomNavigationBarTheme: const BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed),
bottomSheetTheme: const BottomSheetThemeData(backgroundColor: Colors.black),
buttonBarTheme: const ButtonBarThemeData(alignment: MainAxisAlignment.start),
buttonTheme: const ButtonThemeData(colorScheme: ColorScheme.dark()),
cardTheme: const CardTheme(color: Colors.black),
checkboxTheme: const CheckboxThemeData(),
chipTheme: chipTheme,
dataTableTheme: const DataTableThemeData(),
dialogTheme: const DialogTheme(backgroundColor: Colors.black), dialogTheme: const DialogTheme(backgroundColor: Colors.black),
dividerTheme: const DividerThemeData(color: Colors.black),
drawerTheme: const DrawerThemeData(),
elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(primary: Colors.green)),
expansionTileTheme: const ExpansionTileThemeData(backgroundColor: Colors.black),
floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: Colors.black), floatingActionButtonTheme: const FloatingActionButtonThemeData(backgroundColor: Colors.black),
listTileTheme: const ListTileThemeData(),
navigationBarTheme: const NavigationBarThemeData(backgroundColor: Colors.black), navigationBarTheme: const NavigationBarThemeData(backgroundColor: Colors.black),
navigationRailTheme: const NavigationRailThemeData(backgroundColor: Colors.black), navigationRailTheme: const NavigationRailThemeData(backgroundColor: Colors.black),
typography: Typography.material2018(),
cupertinoOverrideTheme: null,
snackBarTheme: const SnackBarThemeData(backgroundColor: Colors.black),
bottomSheetTheme: const BottomSheetThemeData(backgroundColor: Colors.black),
popupMenuTheme: const PopupMenuThemeData(color: Colors.black),
bannerTheme: const MaterialBannerThemeData(backgroundColor: Colors.black),
dividerTheme: const DividerThemeData(color: Colors.black),
buttonBarTheme: const ButtonBarThemeData(alignment: MainAxisAlignment.start),
bottomNavigationBarTheme: const BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed),
timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black),
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(primary: Colors.red)),
elevatedButtonTheme: ElevatedButtonThemeData(style: ElevatedButton.styleFrom(primary: Colors.green)),
outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(primary: Colors.blue)), outlinedButtonTheme: OutlinedButtonThemeData(style: OutlinedButton.styleFrom(primary: Colors.blue)),
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black), popupMenuTheme: const PopupMenuThemeData(color: Colors.black),
dataTableTheme: const DataTableThemeData(),
checkboxTheme: const CheckboxThemeData(),
radioTheme: const RadioThemeData(),
switchTheme: const SwitchThemeData(),
progressIndicatorTheme: const ProgressIndicatorThemeData(), progressIndicatorTheme: const ProgressIndicatorThemeData(),
drawerTheme: const DrawerThemeData(), radioTheme: const RadioThemeData(),
listTileTheme: const ListTileThemeData(), sliderTheme: sliderTheme,
snackBarTheme: const SnackBarThemeData(backgroundColor: Colors.black),
switchTheme: const SwitchThemeData(),
tabBarTheme: const TabBarTheme(labelColor: Colors.black),
textButtonTheme: TextButtonThemeData(style: TextButton.styleFrom(primary: Colors.red)),
textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.black),
timePickerTheme: const TimePickerThemeData(backgroundColor: Colors.black),
toggleButtonsTheme: const ToggleButtonsThemeData(textStyle: TextStyle(color: Colors.black)),
tooltipTheme: const TooltipThemeData(height: 100),
// DEPRECATED (newest deprecations at the bottom)
accentColor: Colors.black,
accentColorBrightness: Brightness.dark,
accentTextTheme: ThemeData.dark().textTheme,
accentIconTheme: ThemeData.dark().iconTheme,
buttonColor: Colors.black,
fixTextFieldOutlineLabel: false, fixTextFieldOutlineLabel: false,
extensions: const <Object, ThemeExtension<dynamic>>{}, primaryColorBrightness: Brightness.dark,
); );
final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors( final SliderThemeData otherSliderTheme = SliderThemeData.fromPrimaryColors(