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