Skip to content

Commit

Permalink
fix #56 new theme for RSSAid (#57)
Browse files Browse the repository at this point in the history
* feat: new theme

* feat: code refactor

* feat: remove hardcode theme

* feat: use not found widget

* feat: remove all snack bar and use oktoast instead
  • Loading branch information
LeetaoGoooo committed Jul 19, 2024
1 parent 1939a2b commit ccdc627
Show file tree
Hide file tree
Showing 9 changed files with 673 additions and 368 deletions.
2 changes: 1 addition & 1 deletion lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"notfoundinClipboard": "No links detected on clipboard",
"fromClipboard": "Import from clipboard",
"inputbyKeyboard": "Import from plain text",
"notfound": "Not found",
"notfound": "Not Found",
"addConfig": "Create configuration",
"submitNewRules": "Submit new rules",
"whichSupport": "View supported rules",
Expand Down
7 changes: 3 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:oktoast/oktoast.dart';
import 'package:rssaid/shared_prefs.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:rssaid/theme.dart';
import 'package:rssaid/views/home.dart';

Future<void> main() async {
Expand Down Expand Up @@ -38,10 +39,8 @@ class RSSAidApp extends StatelessWidget {
Locale('en', ''), // English, no country code
Locale('zh', ''), // Chinese, no country code
],
theme: ThemeData(
useMaterial3: true,
brightness: Brightness.light, //指定亮度主题,有白色/黑色两种可选。
), //这里我们选浅蓝色为强调色值。
theme: MaterialTheme(Theme.of(context).textTheme).light(),
darkTheme: MaterialTheme(Theme.of(context).textTheme).dark(),
home: HomePage(),
));
}
Expand Down
Loading

0 comments on commit ccdc627

Please sign in to comment.