toJson method
Encodes the given value
to a JSON compatible Map. The returned Map will
have the following structure:
{
"androidOverscrollIndicator": <AndroidOverscrollIndicator>,
"appBarTheme": <AppBarTheme>,
"applyElevationOverlayColor": <bool>,
"bannerTheme": <MaterialBannerThemeData>,
"backgroundColor": <Color>,
"bottomAppBarColor": <Color>,
"bottomAppBarTheme": <BottomAppBarTheme>,
"bottomNavigationBarTheme": <BottomNavigationBarThemeData>,
"bottomSheetTheme": <BottomSheetThemeData>,
"brightness": <Brightness>,
"buttonBarTheme": <ButtonBarThemeData>,
"buttonTheme": <ButtonThemeData>,
"canvasColor": <Color>,
"cardColor": <Color>,
"cardTheme": <CardTheme>,
"chipTheme": <ChipThemeData>,
"colorScheme": <ColorScheme>,
"cupertinoOverrideTheme": <CupertinoThemeData>,
"dataTableTheme": <DataTableThemeData>,
"dialogBackgroundColor": <Color>,
"dialogTheme": <DialogTheme>,
"disabledColor": <Color>,
"dividerColor": <Color>,
"dividerTheme": <DividerThemeData>,
"drawerTheme": <DrawerThemeData>,
"elevatedButtonTheme": <ElevatedButtonThemeData>,
"errorColor": <Color>,
"floatingActionButtonTheme": <FloatingActionButtonThemeData>,
"focusColor": <Color>,
"fontFamily": <String>,
"highlightColor": <Color>,
"hintColor": <Color>,
"hoverColor": <Color>,
"iconTheme": <IconThemeData>,
"indicatorColor": <Color>,
"inputDecorationTheme": <InputDecorationTheme>,
"listTileTheme": <ListTileThemeData>,
"materialTapTargetSize": <MaterialTapTargetSize>,
"navigationBarTheme": <NavigationBarThemeData>,
"navigationRailTheme": <NavigationRailThemeData>,
"outlinedButtonTheme": <OutlinedButtonThemeData>,
"platform": <TargetPlatform>,
"popupMenuTheme": <PopupMenuThemeData>,
"primaryColor": <Color>,
"primaryColorBrightness": <Brightness>,
"primaryColorDark": <Color>,
"primaryColorLight": <Color>,
"primaryIconTheme": <IconThemeData>,
"primarySwatch": <MaterialColor>,
"primaryTextTheme": <TextTheme>,
"scaffoldBackgroundColor": <Color>,
"secondaryHeaderColor": <Color>,
"selectedRowColor": <Color>,
"shadowColor": <Color>,
"sliderTheme": <SliderThemeData>,
"snackBarTheme": SnackBarThemeData>,
"splashColor": <Color>,
"splashFactory": <InteractiveInkFeatureFactory>,
"tabBarTheme": <TabBarTheme>,
"textButtonTheme": <TextButtonThemeData>,
"textSelectionTheme": <TextSelectionThemeData>,
"textTheme": <TextTheme>,
"toggleButtonsTheme": <ToggleButtonsThemeData>,
"toggleableActiveColor": <Color>,
"tooltipTheme": <TooltipThemeData>,
"typography": <Typography>,
"unselectedWidgetColor": <Color>,
"visualDensity": <VisualDensity>
}
Implementation
Map toJson() => ThemeEncoder.encodeThemeData(this) ?? Map();