themeData property

ThemeData get themeData

Main theme data that can be used directly in MaterialApp

Implementation

ThemeData get themeData => ThemeData(
  useMaterial3: true,
  colorScheme: colorScheme,
  textTheme: textTheme,
  brightness: colorScheme.brightness,
  primaryColor: colorScheme.primary,
  scaffoldBackgroundColor: colorScheme.surface,
  highlightColor: colorScheme.primary.withAlpha(38), // 15% alpha
  dividerColor: colorScheme.onSecondaryContainer,
  fontFamily: typography.fontFamily,
  visualDensity: VisualDensity.adaptivePlatformDensity,
  // App structure
  appBarTheme: appBarTheme,
  bottomNavigationBarTheme: bottomNavigationBarTheme,
  navigationBarTheme: navigationBarTheme,
  navigationRailTheme: navigationRailTheme,

  // Buttons
  buttonTheme: buttonTheme,
  textButtonTheme: textButtonTheme,
  elevatedButtonTheme: elevatedButtonTheme,
  outlinedButtonTheme: outlinedButtonTheme,
  filledButtonTheme: filledButtonTheme,
  iconButtonTheme: iconButtonTheme,
  floatingActionButtonTheme: floatingActionButtonTheme,

  // Inputs & selections
  inputDecorationTheme: inputDecorationTheme,
  checkboxTheme: checkboxTheme,
  radioTheme: radioTheme,
  switchTheme: switchTheme,
  sliderTheme: sliderTheme,

  // Surfaces
  cardTheme: cardTheme,
  dialogTheme: dialogTheme,
  bannerTheme: bannerTheme,
  snackBarTheme: snackBarTheme,
  popupMenuTheme: popupMenuTheme,

  // Indicators
  chipTheme: chipTheme,
  badgeTheme: badgeTheme,
  progressIndicatorTheme: progressIndicatorTheme,

  // Dividers
  dividerTheme: dividerTheme,

  // Visual density
  //visualDensity: VisualDensity.standard,

  // Platform adaptations
  platform: TargetPlatform.android,
);