0.1.2 #1
+4
-3
@@ -8,14 +8,14 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
||||
import 'package:timezone/data/latest_all.dart' as tz;
|
||||
import 'package:timezone/timezone.dart' as tz;
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:alarm/alarm.dart';
|
||||
//import 'package:alarm/alarm.dart';
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
tz.initializeTimeZones();
|
||||
await Alarm.init();
|
||||
//await Alarm.init();
|
||||
runApp(const SunsetAlarmApp());
|
||||
}
|
||||
|
||||
@@ -256,6 +256,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
debugPrint('DEBUG: Alarm time: ${tzAlarm.toString()}');
|
||||
debugPrint('DEBUG: Current time: ${DateTime.now().toUtc().toString()}');
|
||||
debugPrint('DEBUG: ${_notifications.toString()}');
|
||||
// End Notification Method ***/
|
||||
|
||||
/*** Alarm Method - WIP *** /
|
||||
// Schedule:
|
||||
@@ -276,8 +277,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
stopButton: 'Dismiss',
|
||||
),
|
||||
);
|
||||
|
||||
await Alarm.set(alarmSettings: settings);
|
||||
// End Alarm Method ***/
|
||||
} else {
|
||||
_showSnack('Platform not detected, unsure how to show alarm.');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user