diff --git a/.vscode/launch.json b/.vscode/launch.json index d7c5f4c..81655b8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,8 @@ "name": "inpus_touch", "cwd": "inpus_touch", "request": "launch", - "type": "dart" + "type": "dart", + "flutterMode": "debug" }, { "name": "inpus_touch (profile mode)", diff --git a/inpus_touch/lib/main.dart b/inpus_touch/lib/main.dart index 2f5187b..4cfcd9e 100644 --- a/inpus_touch/lib/main.dart +++ b/inpus_touch/lib/main.dart @@ -17,19 +17,28 @@ class MainApp extends StatelessWidget { final Brightness brightness = SchedulerBinding.instance.platformDispatcher.platformBrightness; - bool isDark = brightness == Brightness.dark; + final bool isDark = brightness == Brightness.dark; - Color accentColor = (isDark == true + Color accentColor = (isDark ? (darkDynamic?.primary ?? Colors.grey.shade800) : (lightDynamic?.primary ?? Colors.grey.shade200)); + Color secondaryColor = (!isDark + ? (darkDynamic?.secondary ?? Colors.red.shade800) + : (lightDynamic?.secondary ?? Colors.blue.shade200)); + return Scaffold( + appBar: AppBar( + title: const Text('Inpu\'s Touch'), + backgroundColor: secondaryColor, + foregroundColor: isDark ? Colors.white : Colors.black), backgroundColor: accentColor, - body: - Container( - decoration: const BoxDecoration( + body: Container( + decoration: BoxDecoration( image: DecorationImage( - image: AssetImage('assets/clock icon light.png'))))); + image: AssetImage(!isDark + ? 'assets/clock icon dark.png' + : 'assets/clock icon light.png'))))); })); } } diff --git a/inpus_touch/pubspec.yaml b/inpus_touch/pubspec.yaml index b498c56..4ecbca6 100644 --- a/inpus_touch/pubspec.yaml +++ b/inpus_touch/pubspec.yaml @@ -21,3 +21,4 @@ flutter: assets: - assets/clock icon light.png + - assets/clock icon dark.png