diff --git a/lib/main.dart b/lib/main.dart index 244804b..7e62ef9 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -30,9 +30,16 @@ class SolianApp extends StatelessWidget { return MaterialApp.router( title: 'Solian', theme: ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo), + brightness: Brightness.light, + colorScheme: ColorScheme.fromSeed(brightness: Brightness.light, seedColor: Colors.indigo), useMaterial3: true, ), + darkTheme: ThemeData( + brightness: Brightness.dark, + colorScheme: ColorScheme.fromSeed(brightness: Brightness.dark, seedColor: Colors.indigo), + useMaterial3: true, + ), + themeMode: ThemeMode.system, localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, routerConfig: router, diff --git a/lib/screens/chat/channel/editor.dart b/lib/screens/chat/channel/editor.dart index 353a574..b3c6f9f 100644 --- a/lib/screens/chat/channel/editor.dart +++ b/lib/screens/chat/channel/editor.dart @@ -88,7 +88,7 @@ class _ChannelEditorScreenState extends State { final editingBanner = MaterialBanner( padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20), leading: const Icon(Icons.edit_note), - backgroundColor: const Color(0xFFE0E0E0), + backgroundColor: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.9), dividerColor: const Color.fromARGB(1, 0, 0, 0), content: Text(AppLocalizations.of(context)!.chatChannelEditNotify), actions: [ diff --git a/lib/screens/posts/comment_editor.dart b/lib/screens/posts/comment_editor.dart index 6a292ca..7c5d3ca 100644 --- a/lib/screens/posts/comment_editor.dart +++ b/lib/screens/posts/comment_editor.dart @@ -109,7 +109,7 @@ class _CommentEditorScreenState extends State { final editingBanner = MaterialBanner( padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20), leading: const Icon(Icons.edit_note), - backgroundColor: const Color(0xFFE0E0E0), + backgroundColor: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.9), dividerColor: const Color.fromARGB(1, 0, 0, 0), content: Text(AppLocalizations.of(context)!.postEditNotify), actions: [ diff --git a/lib/screens/posts/moment_editor.dart b/lib/screens/posts/moment_editor.dart index 52cdc48..9aee018 100644 --- a/lib/screens/posts/moment_editor.dart +++ b/lib/screens/posts/moment_editor.dart @@ -99,7 +99,7 @@ class _MomentEditorScreenState extends State { final editingBanner = MaterialBanner( padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 20), leading: const Icon(Icons.edit_note), - backgroundColor: const Color(0xFFE0E0E0), + backgroundColor: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.9), dividerColor: const Color.fromARGB(1, 0, 0, 0), content: Text(AppLocalizations.of(context)!.postEditNotify), actions: [ diff --git a/lib/widgets/chat/message_editor.dart b/lib/widgets/chat/message_editor.dart index 2939313..dcfebbe 100644 --- a/lib/widgets/chat/message_editor.dart +++ b/lib/widgets/chat/message_editor.dart @@ -108,7 +108,7 @@ class _ChatMessageEditorState extends State { final editingBanner = MaterialBanner( padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 20), leading: const Icon(Icons.edit_note), - backgroundColor: const Color(0xFFE0E0E0), + backgroundColor: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.9), dividerColor: const Color.fromARGB(1, 0, 0, 0), content: Text(AppLocalizations.of(context)!.chatMessageEditNotify), actions: [ @@ -122,7 +122,7 @@ class _ChatMessageEditorState extends State { final replyingBanner = MaterialBanner( padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 20), leading: const Icon(Icons.reply), - backgroundColor: const Color(0xFFE0E0E0), + backgroundColor: Theme.of(context).colorScheme.surfaceVariant.withOpacity(0.9), dividerColor: const Color.fromARGB(1, 0, 0, 0), content: Text(AppLocalizations.of(context)!.chatMessageReplyNotify), actions: [