getAppTheme function
- AppThemeType type,
- {ThemeType theme: ThemeType.WHITE,
- bool useSystem: true}
App Theme Getter
This is a utility wrapper that abstract the creation of theme service provider. Code outside the theme directory should only use this method to access theme service.
Implementation
AppTheme getAppTheme(AppThemeType type,
{ThemeType theme = ThemeType.WHITE, bool useSystem = true}) {
switch (type) {
case AppThemeType.OFFLINE:
return OfflineAppTheme(themeType: theme, useSystem: useSystem);
case AppThemeType.MOCK:
return MockAppTheme(themeType: theme, useSystem: useSystem);
default:
return OfflineAppTheme(themeType: theme, useSystem: useSystem);
}
}