ソースを参照

Update app theme

Vishnu Mohandas 4 年 前
コミット
3f385e63e9
4 ファイル変更8 行追加7 行削除
  1. 2 1
      lib/main.dart
  2. 2 2
      lib/ui/home_widget.dart
  3. 3 3
      lib/ui/memories_widget.dart
  4. 1 1
      lib/ui/video_controls.dart

+ 2 - 1
lib/main.dart

@@ -109,7 +109,8 @@ class MyApp extends StatelessWidget with WidgetsBindingObserver {
 
     return MaterialApp(
       title: _title,
-      theme: ThemeData.dark(),
+      theme: ThemeData.dark()
+          .copyWith(hintColor: Colors.grey, accentColor: Colors.pink[400]),
       home: HomeWidget(_title),
     );
   }

+ 2 - 2
lib/ui/home_widget.dart

@@ -95,7 +95,7 @@ class _HomeWidgetState extends State<HomeWidget> {
         ),
         elevation: 1,
         backgroundColor: Colors.black38,
-        foregroundColor: Colors.amber,
+        foregroundColor: Theme.of(context).accentColor,
       ),
     );
   }
@@ -143,7 +143,7 @@ class _HomeWidgetState extends State<HomeWidget> {
         ),
       ],
       currentIndex: _selectedNavBarItem,
-      selectedItemColor: Colors.yellow[800],
+      selectedItemColor: Theme.of(context).accentColor,
       onTap: (index) {
         setState(() {
           _selectedNavBarItem = index;

+ 3 - 3
lib/ui/memories_widget.dart

@@ -114,7 +114,7 @@ class MemoryWidget extends StatelessWidget {
           padding: const EdgeInsets.all(8.0),
           child: Column(
             children: [
-              _buildMemoryItem(index),
+              _buildMemoryItem(context, index),
               Padding(padding: EdgeInsets.all(2)),
               Hero(
                 tag: title,
@@ -135,14 +135,14 @@ class MemoryWidget extends StatelessWidget {
     );
   }
 
-  Container _buildMemoryItem(int index) {
+  Container _buildMemoryItem(BuildContext context, int index) {
     final isSeen = memories[index].isSeen();
     return Container(
       decoration: BoxDecoration(
         border: isSeen
             ? Border()
             : Border.all(
-                color: Colors.amber,
+                color: Theme.of(context).accentColor,
                 width: isSeen ? 0 : 2,
               ),
         borderRadius: BorderRadius.circular(40),

+ 1 - 1
lib/ui/video_controls.dart

@@ -288,7 +288,7 @@ class _VideoControlsState extends State<VideoControls> {
           },
           colors: chewieController.materialProgressColors ??
               ChewieProgressColors(
-                  playedColor: Colors.amber,
+                  playedColor: Theme.of(context).accentColor,
                   handleColor: Colors.white,
                   bufferedColor: Colors.white,
                   backgroundColor: Theme.of(context).disabledColor),