Skip to content

Commit

Permalink
docs: add example with fromFile
Browse files Browse the repository at this point in the history
  • Loading branch information
SPodjasek committed Nov 16, 2023
1 parent fdf6073 commit 81bcda4
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ FlutterRingtonePlayer.play(
volume: 0.1, // Android only - API >= 28
asAlarm: false, // Android only - all APIs
);
```
```

Also you can specify a custom ringtone from assets, or provide direct path to file that works for
both Android and iOS:

Also you can specify a custom ringtone from assets that works for both Android and iOS:
```dart
FlutterRingtonePlayer.play(fromAsset: "assets/ringtone.wav");
```
```

```dart
FlutterRingtonePlayer.play(fromFile: "assets/ringtone.wav");
```

You can specify a platform specific ringtone and it will override the one from assets:
```dart
Expand Down

0 comments on commit 81bcda4

Please sign in to comment.