From 0e463078152647b16fc737c72592d76cb987b833 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 12 Sep 2026 17:06:43 -0700 Subject: [PATCH] Automatic refactor after changing Code OSS settings. --- lib/main.dart | 60 +++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 26 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 378c23f..84cc402 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,14 +60,10 @@ class _HomeScreenState extends State { } Future _initNotifications() async { - const androidInit = - AndroidInitializationSettings('@mipmap/ic_launcher'); + const androidInit = AndroidInitializationSettings('@mipmap/ic_launcher'); const iosInit = DarwinInitializationSettings(); await _notifications.initialize( - const InitializationSettings( - android: androidInit, - iOS: iosInit, - ), + const InitializationSettings(android: androidInit, iOS: iosInit), ); } @@ -251,16 +247,20 @@ class _HomeScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ // --- Location section --- - const Text('Location', - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), + const Text( + 'Location', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), const SizedBox(height: 8), Row( children: [ Expanded( child: TextField( controller: _latController, - keyboardType: - const TextInputType.numberWithOptions(signed: true, decimal: true), + keyboardType: const TextInputType.numberWithOptions( + signed: true, + decimal: true, + ), decoration: const InputDecoration( labelText: 'Latitude', border: OutlineInputBorder(), @@ -272,8 +272,10 @@ class _HomeScreenState extends State { Expanded( child: TextField( controller: _lngController, - keyboardType: - const TextInputType.numberWithOptions(signed: true, decimal: true), + keyboardType: const TextInputType.numberWithOptions( + signed: true, + decimal: true, + ), decoration: const InputDecoration( labelText: 'Longitude', border: OutlineInputBorder(), @@ -292,8 +294,10 @@ class _HomeScreenState extends State { const SizedBox(height: 16), // --- Sunset time section --- - const Text('Sunset', - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), + const Text( + 'Sunset', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), const SizedBox(height: 8), Row( children: [ @@ -309,13 +313,14 @@ class _HomeScreenState extends State { ), const SizedBox(width: 8), IconButton.filledTonal( - icon: _loading - ? const SizedBox( - width: 20, - height: 20, - child: CircularProgressIndicator(strokeWidth: 2), - ) - : const Icon(Icons.cloud_done_outlined), + icon: + _loading + ? const SizedBox( + width: 20, + height: 20, + child: CircularProgressIndicator(strokeWidth: 2), + ) + : const Icon(Icons.cloud_done_outlined), tooltip: 'Fetch sunset from Open-Meteo', onPressed: _loading ? null : _fetchSunset, ), @@ -324,8 +329,10 @@ class _HomeScreenState extends State { const SizedBox(height: 16), // --- Minutes before --- - const Text('Alert Before Sunset', - style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)), + const Text( + 'Alert Before Sunset', + style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), + ), const SizedBox(height: 8), Row( children: [ @@ -335,8 +342,9 @@ class _HomeScreenState extends State { child: TextField( controller: _minutesController, keyboardType: TextInputType.number, - decoration: - const InputDecoration(border: OutlineInputBorder()), + decoration: const InputDecoration( + border: OutlineInputBorder(), + ), onChanged: (v) { final val = int.tryParse(v); if (val != null && val > 0) { @@ -365,4 +373,4 @@ class _HomeScreenState extends State { ), ); } -} \ No newline at end of file +}