|
1 jaar geleden | |
---|---|---|
lib | 1 jaar geleden | |
test | 3 jaren geleden | |
.gitignore | 3 jaren geleden | |
.metadata | 3 jaren geleden | |
CHANGELOG.md | 3 jaren geleden | |
LICENSE | 3 jaren geleden | |
README.md | 3 jaren geleden | |
pubspec.yaml | 1 jaar geleden |
A theme package project for Flyinsono application.
// Implement `FTheme` abstract methods
class TestTheme extends FTheme {
TestTheme(
{String defaultName = "lightness",
ThemeMode themeMode = ThemeMode.system})
: super(defaultName: defaultName, themeMode: themeMode);
@override
void applyThemeData() {
// TODO: implement applyThemeData
}
@override
// TODO: implement currentBrightness
Brightness get currentBrightness => throw UnimplementedError();
@override
// TODO: implement isCurrentChinese
bool get isCurrentChinese => throw UnimplementedError();
}
// Create global `FTheme` instance & init
final instance = AppTheme(themeMode: ThemeMode.system);
await FTheme.init(instance);
// Get color scheme
final scheme = FTheme.ins.colorScheme;
print(scheme.primary);
// Switch theme mode
FTheme.ins.switchThemeMode(ThemeMode.dark);
// Switch theme
FTheme.ins.switchTheme("pink");