杏聆荟Flutter客户端 主题和资源管理库

loki.wu 23644f6e06 更新rpc库引用 1 jaar geleden
lib 625e5ebde3 新增mock入口,防止应用时报错 1 jaar geleden
test a7043dd4e6 project initialization 3 jaren geleden
.gitignore 7994de04dc update package info 3 jaren geleden
.metadata a7043dd4e6 project initialization 3 jaren geleden
CHANGELOG.md a7043dd4e6 project initialization 3 jaren geleden
LICENSE a7043dd4e6 project initialization 3 jaren geleden
README.md 7994de04dc update package info 3 jaren geleden
pubspec.yaml 23644f6e06 更新rpc库引用 1 jaar geleden

README.md

fis_theme

A theme package project for Flyinsono application.

Usage

// 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");