DataSource class

Represents a data source for a video.

A data source can either be:

  • An asset (e.g. a video file bundled with the app).
  • A network resource (e.g. a video hosted on a server).
  • A local file (e.g. a video file stored on the device).

Constructors

DataSource.asset(String assetUri)
Creates a new Asset DataSource object with the given uri and type.
factory
DataSource.file(String fileUri)
Creates a new File DataSource object with the given uri and type.
factory
DataSource.network(String networkUri)
Creates a new Network DataSource object with the given uri and type.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type DataSourceType
The type of the data source.
final
uri String
The URI of the data source.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Converts the DataSource object to a map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited