diff --git a/lib/main.dart b/lib/main.dart index d50e053..5947572 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -12,8 +12,6 @@ import 'package:alarm/alarm.dart'; import 'dart:convert'; /// TBD: -/// v0.2.0 -/// - Cancel the Android alarm when the toggle is unswitched. /// v0.2.1 /// - Fix time to get 0 prefixed if before 10:00 (5:30 becomes 05:30). /// - Fix time to validate properly rather than allowing garbage (error 530). @@ -275,13 +273,13 @@ class _HomeScreenState extends State { // Schedule: final settings = AlarmSettings( id: _alarmId, - dateTime: alarmTime, // your computed sunset time - //assetAudioPath: 'assets/alarm.mp3', // put an alarm sound in assets/ + dateTime: alarmTime, + //assetAudioPath: 'assets/alarm.mp3', // use default rather than custom loopAudio: true, // keeps ringing until dismissed vibrate: true, androidFullScreenIntent: true, // wakes screen like clock app volumeSettings: VolumeSettings.fade( - //volume: 0.8, + //volume: 0.8, // use default rather than custom fadeDuration: Duration(seconds: 60), ), notificationSettings: NotificationSettings( @@ -377,7 +375,7 @@ class _HomeScreenState extends State { const SizedBox(width: 8), IconButton.filledTonal( icon: const Icon(Icons.my_location), - tooltip: 'Get GPS location', + tooltip: 'Get GPS Location', onPressed: _getGpsLocation, ), ], @@ -396,7 +394,7 @@ class _HomeScreenState extends State { child: TextField( controller: _sunsetController, decoration: const InputDecoration( - labelText: 'Sunset time (HH:MM)', + labelText: 'Sunset Time (HH:MM)', border: OutlineInputBorder(), ), onChanged: (_) => _savePrefs(), @@ -412,19 +410,20 @@ class _HomeScreenState extends State { child: CircularProgressIndicator(strokeWidth: 2), ) : const Icon(Icons.cloud_done_outlined), - tooltip: 'Fetch sunset from Open-Meteo', + tooltip: 'Fetch Sunset Time from Open-Meteo', onPressed: _loading ? null : _fetchSunset, ), ], ), const SizedBox(height: 16), - // --- Minutes before --- const Text( - 'Alert Before Sunset', + 'Alert', style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), ), const SizedBox(height: 8), + + // --- Minutes before --- Row( children: [ const Text('Minutes before: '),