ScreenSaverMedia class
A model class representing a media item for use in the screen saver.
It contains information about the type of media, its source path or URL, and an optional placeholder image to display if loading fails.
Constructors
- ScreenSaverMedia.new(MediaType type, String source, {String? placeholder})
-
Creates a ScreenSaverMedia with the given
type
,source
, and optionalplaceholder
.const - ScreenSaverMedia.gif(String source, {String? placeholder})
-
Creates a gif media item with the given
source
and optionalplaceholder
.const - ScreenSaverMedia.image(String source, {String? placeholder})
-
Creates an image media item with the given
source
and optionalplaceholder
.const - ScreenSaverMedia.video(String source, {String? placeholder})
-
Creates a video media item with the given
source
and optionalplaceholder
.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- placeholder → String?
-
An optional placeholder image asset path to use if the media fails to load.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String
-
The source path or URL of the media.
final
- type → MediaType
-
The type of media (image, gif, or video).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited