- Add this to your pubspec.yaml file:
dependencies:
better_player: ^0.0.83
- Install it
$ flutter pub get
- Import it
import 'package:better_player/better_player.dart';
- (Required) iOS configuration You need to change these settings in order to run Better Player on iOS:
- Set deployment info of your project to min. iOS 11.0 version.
- Set Swift 5 version.
- (Required) Android configuration. You need to change these settings in order to run Better Player on Android:
- Set compileSdkVersion to 31.
- Set kotlin version to 1.5.31.
- Enable multidex.
- (Optional) Additional iOS configuration
Add this into your info.plist
file to support full screen rotation (Better Player will rotate screen to horizontal position when full screen is enabled):
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>