stayAwake property

bool stayAwake
final

By default, when the screen is locked, all the app's processing stops, including audio playback. You can set this flag to keep your audio playing even when locked.

On Android, this sets the player "wake mode" to PARTIAL_WAKE_LOCK.

On iOS, this will happen automatically as long as:

Implementation

final bool stayAwake;