PlaylistId class
Encapsulates a valid YouTube playlist ID.
- Annotations
-
- @freezed
Constructors
- PlaylistId(String idOrUrl)
-
Initializes an instance of PlaylistId
factory
- PlaylistId.fromString(dynamic obj)
-
Converts
obj
to a PlaylistId by calling .toString on that object. If it is already a PlaylistId,obj
is returnedfactory
Properties
-
copyWith
→ $PlaylistIdCopyWith<
PlaylistId> -
Create a copy of PlaylistId
with the given fields replaced by the non-null parameter values.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The playlist id as string.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
parsePlaylistId(
String url) → String? -
Parses a playlist
url
returning its id. If theurl
is a valid it is returned itself. -
validatePlaylistId(
String playlistId) → bool -
Returns true if the given
playlistId
is valid.