1.0.0 #2
+20
-2
@@ -16,8 +16,6 @@ import 'dart:convert';
|
||||
/// - Add sunrise section and change app name to Sunshine Alarm?
|
||||
/// v1.0.0
|
||||
/// - Follow system theme rather than using a custom theme.
|
||||
/// v1.0.1
|
||||
/// - Use a timepicker if the user clicks on the sunset/sunrise time.
|
||||
/// :TBD
|
||||
|
||||
void main() async {
|
||||
@@ -408,6 +406,26 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
labelText: 'Sunset Time (HH:MM)',
|
||||
border: OutlineInputBorder(),
|
||||
errorText: _sunsetErrorText,
|
||||
suffixIcon: IconButton(
|
||||
icon: Icon(Icons.access_time),
|
||||
onPressed: () async {
|
||||
final picked = await showTimePicker(
|
||||
context: context,
|
||||
initialTime: TimeOfDay.now(),
|
||||
);
|
||||
if (picked != null) {
|
||||
_sunsetController.text =
|
||||
'${picked.hour.toString().padLeft(2, '0')}:'
|
||||
'${picked.minute.toString().padLeft(2, '0')}';
|
||||
setState(
|
||||
() =>
|
||||
_sunsetErrorText = _validateTime(
|
||||
_sunsetController.text,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
onChanged: (v) {
|
||||
final val = _validateTime(v);
|
||||
|
||||
Reference in new issue
Block a user