1.0.1 #3

Merged
me merged 22 commits from dev into main 2026-09-29 17:54:06 -07:00
Showing only changes of commit 0e481f13cc - Show all commits
+16 -11
View File
@@ -79,8 +79,8 @@ class HomeScreen extends StatefulWidget {
class _HomeScreenState extends State<HomeScreen> { class _HomeScreenState extends State<HomeScreen> {
final _latController = TextEditingController(); final _latController = TextEditingController();
final _lngController = TextEditingController(); final _lngController = TextEditingController();
final _sunsetController = TextEditingController(); final _sunsetController = TextEditingController(text: "18:00");
final _minutesController = TextEditingController(text: '30'); final _minutesController = TextEditingController(text: "30");
final FlutterLocalNotificationsPlugin _notifications = final FlutterLocalNotificationsPlugin _notifications =
FlutterLocalNotificationsPlugin(); FlutterLocalNotificationsPlugin();
@@ -559,18 +559,23 @@ class _HomeScreenState extends State<HomeScreen> {
// --- Toggle --- // --- Toggle ---
Expanded( Expanded(
child: SwitchListTile( child:
//title: const Text('Enable Sunset Alarm'), _validTime
title: Text(_alarmEnabled ? 'Sunset Alarm Enabled' : ""), ? SwitchListTile(
title: Text(
_alarmEnabled ? 'Sunset Alarm Enabled' : "",
),
subtitle: Text( subtitle: Text(
_alarmEnabled _validTime
? _alarmEnabled
? '${_minutesBefore} Minute${_plural} Before @ $_alarmDisplayTime' ? '${_minutesBefore} Minute${_plural} Before @ $_alarmDisplayTime'
: "", : ""
), : "Add Time",
value: _validTime ? _alarmEnabled : false,
// If _isDataLoaded is false, onChanged is null, disabling the switch
onChanged: _validTime ? _toggleAlarm : null,
), ),
value: _alarmEnabled,
onChanged: _toggleAlarm,
)
: Center(child: Text("Sunset Time Invalid")),
), ),
], ],
), ),