setFileDataSource method

Future<void> setFileDataSource(
  1. File file, {
  2. bool? showNotification,
  3. String? title,
  4. String? author,
  5. String? imageUrl,
  6. String? notificationChannelName,
  7. Duration? overriddenDuration,
  8. String? activityName,
  9. String? clearKey,
})

Set data source for playing a video from a file.

This will load the file from the file-URI given by: 'file://${file.path}'.

Implementation

Future<void> setFileDataSource(
  File file, {
  bool? showNotification,
  String? title,
  String? author,
  String? imageUrl,
  String? notificationChannelName,
  Duration? overriddenDuration,
  String? activityName,
  String? clearKey,
}) => _setDataSource(
  DataSource(
    sourceType: DataSourceType.file,
    uri: 'file://${file.path}',
    showNotification: showNotification,
    title: title,
    author: author,
    imageUrl: imageUrl,
    notificationChannelName: notificationChannelName,
    overriddenDuration: overriddenDuration,
    activityName: activityName,
    clearKey: clearKey,
  ),
);