Skip to content

Commit

Permalink
Export AlarmSettings from Alarm class
Browse files Browse the repository at this point in the history
  • Loading branch information
gdelataillade committed May 31, 2024
1 parent f2dff16 commit ac8d972
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ Related issue [here](https://github.com/gdelataillade/alarm/issues/47#issuecomme
### Why does my app crash on iOS?

Crashes such as `EXC_BAD_ACCESS KERN_INVALID_ADDRESS` occur if `Alarm.set` and `Alarm.stop` methods are called concurrently, as they both modify shared resources. To prevent this, ensure each method call is completed before starting the next by using the `await` keyword in Dart:
```dart
```
await Alarm.set
await Alarm.stop
```
Expand Down
1 change: 0 additions & 1 deletion example/lib/screens/edit_alarm.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:flutter/material.dart';

class ExampleAlarmEditScreen extends StatefulWidget {
Expand Down
1 change: 0 additions & 1 deletion example/lib/screens/home.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:alarm_example/screens/edit_alarm.dart';
import 'package:alarm_example/screens/ring.dart';
import 'package:alarm_example/screens/shortcut_button.dart';
Expand Down
1 change: 0 additions & 1 deletion example/lib/screens/ring.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:flutter/material.dart';

class ExampleAlarmRingScreen extends StatelessWidget {
Expand Down
1 change: 0 additions & 1 deletion example/lib/screens/shortcut_button.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:io';

import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:flutter/material.dart';

class ExampleAlarmHomeShortcutButton extends StatefulWidget {
Expand Down
2 changes: 2 additions & 0 deletions lib/alarm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import 'package:alarm/utils/alarm_exception.dart';
import 'package:alarm/utils/extensions.dart';
import 'package:flutter/foundation.dart';

export 'package:alarm/model/alarm_settings.dart';

/// Custom print function designed for Alarm plugin.
DebugPrintCallback alarmPrint = debugPrintThrottled;

Expand Down
1 change: 0 additions & 1 deletion lib/src/android_alarm.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:alarm/service/alarm_storage.dart';
import 'package:alarm/utils/alarm_exception.dart';
import 'package:flutter/services.dart';
Expand Down
1 change: 0 additions & 1 deletion lib/src/ios_alarm.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';

import 'package:alarm/alarm.dart';
import 'package:alarm/model/alarm_settings.dart';
import 'package:alarm/service/alarm_storage.dart';
import 'package:alarm/utils/alarm_exception.dart';
import 'package:flutter/services.dart';
Expand Down

0 comments on commit ac8d972

Please sign in to comment.