setThemeData method
Assigning the Material theme
Implementation
ThemeData? setThemeData(BuildContext context) {
//
ThemeData? themeData = _theme ?? onTheme();
if (_allowChangeTheme) {
// If a saved preference
final theme = v.App.themeData;
if (theme != null) {
themeData = theme;
}
}
// If not explicitly provided by the user
if (themeData == null) {
// possibly Cupertino can provide
final cupertinoThemeData =
_iOSTheme ?? oniOSTheme() ?? v.App.iOSThemeData;
if (cupertinoThemeData == null) {
// The original theme
v.App.themeData ??= ThemeData.fallback(useMaterial3: false);
} else {
// Cupertino values
v.App.themeData = cupertinoThemeData;
}
themeData = v.App.themeData;
} else {
v.App.themeData = themeData;
}
return themeData;
}