-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: navigation to settings not working
- Loading branch information
Kingkor Roy Tirtho
committed
Apr 30, 2023
1 parent
6d836bd
commit ce10aa1
Showing
7 changed files
with
78 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,25 @@ | ||
import 'package:audioplayers/audioplayers.dart'; | ||
|
||
final audioPlayer = AudioPlayer(); | ||
final audioPlayer = (() { | ||
AudioPlayer.global.setAudioContext( | ||
const AudioContext( | ||
android: AudioContextAndroid( | ||
audioFocus: AndroidAudioFocus.gain, | ||
audioMode: AndroidAudioMode.inCall, | ||
contentType: AndroidContentType.music, | ||
stayAwake: true, | ||
usageType: AndroidUsageType.media, | ||
), | ||
iOS: AudioContextIOS( | ||
category: AVAudioSessionCategory.playback, | ||
options: [ | ||
AVAudioSessionOptions.allowBluetooth, | ||
AVAudioSessionOptions.allowBluetoothA2DP, | ||
AVAudioSessionOptions.defaultToSpeaker, | ||
AVAudioSessionOptions.mixWithOthers, | ||
], | ||
), | ||
), | ||
); | ||
return AudioPlayer(); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters