1.0.0 #2
+5
-6
@@ -6,7 +6,6 @@ import 'package:geolocator/geolocator.dart';
|
|||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
|
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:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:alarm/alarm.dart';
|
import 'package:alarm/alarm.dart';
|
||||||
|
|
||||||
@@ -261,19 +260,19 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||||||
/*** Alarm Method - WIP ***/
|
/*** Alarm Method - WIP ***/
|
||||||
// Schedule:
|
// Schedule:
|
||||||
final settings = AlarmSettings(
|
final settings = AlarmSettings(
|
||||||
id: 42,
|
id: _alarmId,
|
||||||
dateTime: alarmTime, // your computed sunset time
|
dateTime: alarmTime, // your computed sunset time
|
||||||
assetAudioPath: 'assets/alarm.mp3', // put an alarm sound in assets/
|
//assetAudioPath: 'assets/alarm.mp3', // put an alarm sound in assets/
|
||||||
loopAudio: true, // keeps ringing until dismissed
|
loopAudio: true, // keeps ringing until dismissed
|
||||||
vibrate: true,
|
vibrate: true,
|
||||||
androidFullScreenIntent: true, // wakes screen like clock app
|
androidFullScreenIntent: true, // wakes screen like clock app
|
||||||
volumeSettings: VolumeSettings.fade(
|
volumeSettings: VolumeSettings.fade(
|
||||||
volume: 0.8,
|
volume: 0.8,
|
||||||
fadeDuration: Duration(seconds: 5),
|
fadeDuration: Duration(seconds: 60),
|
||||||
),
|
),
|
||||||
notificationSettings: const NotificationSettings(
|
notificationSettings: NotificationSettings(
|
||||||
title: 'Sunset Alarm',
|
title: 'Sunset Alarm',
|
||||||
body: 'The sun sets now. Time to get ready!',
|
body: 'Sun is setting in ${_minutesBefore} minute(s)!',
|
||||||
stopButton: 'Dismiss',
|
stopButton: 'Dismiss',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in new issue
Block a user