SimplePlayerSettings.assets constructor

SimplePlayerSettings.assets({
  1. required String path,
  2. String? label,
  3. double? aspectRatio,
  4. bool? autoPlay,
  5. bool? loopMode,
  6. bool? expand,
  7. bool? muteOnAutoPlay,
  8. BoxFit? fit,
  9. BoxFit? fullScreenFit,
  10. Color? colorAccent,
})

See SimplePlayerSettings.network for the full property reference.

Implementation

factory SimplePlayerSettings.assets({
  required String path,
  String? label,
  double? aspectRatio,
  bool? autoPlay,
  bool? loopMode,
  bool? expand,
  bool? muteOnAutoPlay,
  BoxFit? fit,
  BoxFit? fullScreenFit,
  Color? colorAccent,
}) {
  return SimplePlayerSettings(
    type: 'assets',
    path: path,
    label: label ?? '',
    aspectRatio: aspectRatio ?? 16 / 9,
    autoPlay: autoPlay ?? false,
    loopMode: loopMode ?? false,
    expand: expand ?? false,
    muteOnAutoPlay: muteOnAutoPlay ?? false,
    fit: fit ?? BoxFit.contain,
    fullScreenFit: fullScreenFit ?? BoxFit.contain,
    colorAccent: colorAccent ?? Colors.red,
  );
}