v1.1.0adwaita
Adwaita 風格 - 為您的 Flutter 應用程式提供的 GTK+ 預設主題。
20喜歡 140近 30 天下載70Pub 分數
平台暫無資料
Flutter/Dart 的 Adwaita 主題實現
{"sdk":"flutter"}^4.0.0以下為英文專案原文快照,最新內容請造訪 GitHub。
Implementation of the adwaita color scheme found in libadwaita.
Inspired by the yaru theme for flutter.
import 'package:flutter/material.dart';
import 'package:adwaita/adwaita.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
final ValueNotifier<ThemeMode> themeNotifier = ValueNotifier(ThemeMode.light);
MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ValueListenableBuilder<ThemeMode>(
valueListenable: themeNotifier,
builder: (_, ThemeMode currentMode, __) {
return MaterialApp(
theme: AdwaitaThemeData.light(),
darkTheme: AdwaitaThemeData.dark(),
debugShowCheckedModeBanner: false,
home: MyHomePage(themeNotifier: themeNotifier),
themeMode: currentMode);
});
}
}
light_theme
dark_theme