Skip to content

Commit

Permalink
Update dependencies & increment version to 3.1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
gdelataillade committed Aug 28, 2024
1 parent 75803e6 commit 809270e
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 39 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.6
* Update `flutter_fgbg` dependency to `0.6.0`.
* Update `shared_preferences` dependency to `2.3.2`.

## 3.1.5
* [Android] Fix volume/focus post-alarm.
* Export `AlarmSettings` class in `Alarm` class.
Expand Down
4 changes: 2 additions & 2 deletions example/lib/screens/edit_alarm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ class _ExampleAlarmEditScreenState extends State<ExampleAlarmEditScreen> {
if (loading) return;
setState(() => loading = true);
Alarm.set(alarmSettings: buildAlarmSettings()).then((res) {
if (res) Navigator.pop(context, true);
if (res && mounted) Navigator.pop(context, true);
setState(() => loading = false);
});
}

void deleteAlarm() {
Alarm.stop(widget.alarmSettings!.id).then((res) {
if (res) Navigator.pop(context, true);
if (res && mounted) Navigator.pop(context, true);
});
}

Expand Down
2 changes: 1 addition & 1 deletion example/lib/screens/home.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class _ExampleAlarmHomeScreenState extends State<ExampleAlarmHomeScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('alarm 3.1.5')),
appBar: AppBar(title: const Text('alarm 3.1.6')),
body: SafeArea(
child: alarms.isNotEmpty
? ListView.separated(
Expand Down
9 changes: 6 additions & 3 deletions example/lib/screens/ring.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class ExampleAlarmRingScreen extends StatelessWidget {
now.minute,
).add(const Duration(minutes: 1)),
),
).then((_) => Navigator.pop(context));
).then((_) {
if (context.mounted) Navigator.pop(context);
});
},
child: Text(
'Snooze',
Expand All @@ -43,8 +45,9 @@ class ExampleAlarmRingScreen extends StatelessWidget {
),
RawMaterialButton(
onPressed: () {
Alarm.stop(alarmSettings.id)
.then((_) => Navigator.pop(context));
Alarm.stop(alarmSettings.id).then((_) {
if (context.mounted) Navigator.pop(context);
});
},
child: Text(
'Stop',
Expand Down
58 changes: 29 additions & 29 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "3.1.4"
version: "3.1.5"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -89,10 +89,10 @@ packages:
dependency: transitive
description:
name: flutter_fgbg
sha256: "08c4d2fd229e3df26083d5aecc3dea9ff4f2d188f8cd57aaf2b3f047bd08a047"
sha256: e02ad0738ba5fc7f331b62acb0d74aa540626a6441ae18fad685faa5ac4ad7a5
url: "https://pub.dev"
source: hosted
version: "0.3.0"
version: "0.6.0"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -107,18 +107,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
url: "https://pub.dev"
source: hosted
version: "10.0.4"
version: "10.0.5"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
url: "https://pub.dev"
source: hosted
version: "3.0.3"
version: "3.0.5"
leak_tracker_testing:
dependency: transitive
description:
Expand All @@ -139,18 +139,18 @@ packages:
dependency: transitive
description:
name: material_color_utilities
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.8.0"
version: "0.11.1"
meta:
dependency: transitive
description:
name: meta
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.15.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -251,58 +251,58 @@ packages:
dependency: transitive
description:
name: shared_preferences
sha256: d3bbe5553a986e83980916ded2f0b435ef2e1893dfaa29d5a7a790d0eca12180
sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
version: "2.3.2"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577"
sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e"
url: "https://pub.dev"
source: hosted
version: "2.2.3"
version: "2.3.2"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7"
sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.5.2"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa"
sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.1"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b"
sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.1"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a"
sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e
url: "https://pub.dev"
source: hosted
version: "2.3.0"
version: "2.4.2"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59"
sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.1"
sky_engine:
dependency: transitive
description: flutter
Expand Down Expand Up @@ -352,10 +352,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.7.0"
version: "0.7.2"
vector_math:
dependency: transitive
description:
Expand All @@ -376,10 +376,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc
url: "https://pub.dev"
source: hosted
version: "14.2.1"
version: "14.2.4"
web:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ios_alarm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class IOSAlarm {
required void Function() onForeground,
required void Function() onBackground,
}) {
fgbgSubscriptions[id] = FGBGEvents.stream.listen((event) {
fgbgSubscriptions[id] = FGBGEvents.instance.stream.listen((event) {
if (event == FGBGType.foreground) onForeground();
if (event == FGBGType.background) onBackground();
});
Expand Down
6 changes: 3 additions & 3 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: alarm
description: A simple Flutter alarm manager plugin for both iOS and Android.
version: 3.1.5
version: 3.1.6
homepage: https://github.com/gdelataillade/alarm

environment:
Expand All @@ -10,8 +10,8 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_fgbg: ^0.3.0
shared_preferences: ^2.2.2
flutter_fgbg: ^0.6.0
shared_preferences: ^2.3.2

dev_dependencies:
flutter_test:
Expand Down

0 comments on commit 809270e

Please sign in to comment.