setAssetDataSource method

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

Set data source for playing a video from an asset.

The name of the asset is given by the dataSource argument and must not be null. The package argument must be non-null when the asset comes from a package and null otherwise.

Implementation

Future<void> setAssetDataSource(
  String dataSource, {
  String? package,
  bool? showNotification,
  String? title,
  String? author,
  String? imageUrl,
  String? notificationChannelName,
  Duration? overriddenDuration,
  String? activityName,
}) {
  return _setDataSource(
    DataSource(
      sourceType: DataSourceType.asset,
      asset: dataSource,
      package: package,
      showNotification: showNotification,
      title: title,
      author: author,
      imageUrl: imageUrl,
      notificationChannelName: notificationChannelName,
      overriddenDuration: overriddenDuration,
      activityName: activityName,
    ),
  );
}