withSafaehAccentStyle function
Applies SafaehAccentStyle without dropping other theme extensions.
Implementation
ThemeData withSafaehAccentStyle(ThemeData theme, {required bool subtleAccents}) {
final exts = List<ThemeExtension<dynamic>>.from(
theme.extensions.values.where((e) => e is! SafaehAccentStyle),
)..add(SafaehAccentStyle(subtleAccents: subtleAccents));
return theme.copyWith(extensions: exts);
}