Commit 5b2e205

derdilla <derdilla06@gmail.com>
2023-05-02 16:23:16
FEAT: dark theme
1 parent 654143e
Changed files (2)
lib/components/measurement_list.dart
@@ -81,7 +81,7 @@ class MeasurementList extends StatelessWidget {
             ),
             Expanded(
               flex: _sideFlex,
-              child: SizedBox(),
+              child: const SizedBox(),
             ),
           ]
       ),
@@ -106,8 +106,8 @@ class MeasurementList extends StatelessWidget {
             ),
             Expanded(
                 flex: _tableElementsSizes[1],
-                child: const Text("sys",
-                    style: TextStyle(fontWeight: FontWeight.bold, color: Colors.teal))
+                child: Text("sys",
+                    style: TextStyle(fontWeight: FontWeight.bold, color: Theme.of(context).primaryColor))
             ),
             Expanded(
                 flex: _tableElementsSizes[2],
@@ -131,7 +131,7 @@ class MeasurementList extends StatelessWidget {
           ),
           Divider(
             height: 20,
-            thickness: 1,
+            thickness: 2,
             color: Theme.of(context).primaryColor,
           )
         ]
lib/main.dart
@@ -35,23 +35,20 @@ void main() async {
 class AppRoot extends StatelessWidget {
   const AppRoot({super.key});
 
-  // This widget is the root of your application.
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
       title: 'Blood Pressure Logger',
       theme: ThemeData(
-        // This is the theme of your application.
-        //
-        // Try running your application with "flutter run". You'll see the
-        // application has a blue toolbar. Then, without quitting the app, try
-        // changing the primarySwatch below to Colors.green and then invoke
-        // "hot reload" (press "r" in the console where you ran "flutter run",
-        // or simply save your changes to "hot reload" in a Flutter IDE).
-        // Notice that the counter didn't reset back to zero; the application
-        // is not restarted.
-        primarySwatch: Colors.teal,
+          primaryColor: Colors.teal
       ),
+      darkTheme: ThemeData(
+          brightness: Brightness.dark,
+          canvasColor: Colors.black,
+          primaryColor: Colors.teal.shade400,
+          iconTheme: const IconThemeData(color: Colors.black)
+      ),
+      themeMode: ThemeMode.system,
       home: const AppHome(),
     );
   }