StickerController class base
Plays, pauses and seeks the Stickers it is given to.
Stickers with a controller get an animation of their own, shared only with other stickers on the same controller, so pausing or seeking one never affects a copy elsewhere on screen.
Stickers rely on the controller's own implementation, so it can be extended but not implemented.
- Inheritance
-
- Object
- ChangeNotifier
- StickerController
Constructors
- StickerController({bool playing = true})
-
Creates a controller that starts playing, or paused if
playingis false.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isPlaying → bool
-
Whether the stickers should play. They still only advance while on
screen, under an enabled
TickerMode, with the app in the foreground.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
pause(
) → void - Holds the frame that is showing.
-
play(
) → void - Resumes playback from the frame that is showing.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
seekToFrame(
int frame) → void -
Shows
frame(0-based) on every sticker on this controller right away, playing or paused. A playing sticker carries on from there, and a non-looping one that ended plays again. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited