accentTextTheme property Null safety

TextTheme accentTextTheme
Deprecated('No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' 'This feature was deprecated after v2.3.0-0.1.pre.')">@Deprecated('No longer used by the framework, please remove any reference to it. ' 'For more information, consult the migration guide at ' 'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. ' 'This feature was deprecated after v2.3.0-0.1.pre.')

Obsolete property that was originally used when a TextTheme that contrasted well with the accentColor was needed.

The material library no longer uses this property and most uses of accentColor have been replaced with the theme's colorScheme ColorScheme.secondary. You can configure the color of a textTheme TextStyle so that it contrasts well with the ColorScheme.secondary like this:

final ThemeData theme = Theme.of(context);
theme.textTheme.headline1.copyWith(
  color: theme.colorScheme.onSecondary,
)

Implementation

@Deprecated(
  'No longer used by the framework, please remove any reference to it. '
  'For more information, consult the migration guide at '
  'https://flutter.dev/docs/release/breaking-changes/theme-data-accent-properties#migration-guide. '
  'This feature was deprecated after v2.3.0-0.1.pre.',
)
TextTheme get accentTextTheme => _accentTextTheme!;