ImageSequenceAnimator class
Constructors
-
ImageSequenceAnimator(String folderName, String fileName, int suffixStart, int suffixCount, String fileFormat, double frameCount, {Key? key, List<String>? fullPaths, double fps = 60, bool isLooping = false, bool isBoomerang = false, bool isAutoPlay = true, Color? color, bool isOnline = false, bool waitUntilCacheIsComplete = false, CacheProgressIndicatorBuilder? cacheProgressIndicatorBuilder, ImageSequenceProcessCallback? onReadyToPlay, ImageSequenceProcessCallback? onStartPlaying, ImageSequenceProcessCallback? onPlaying, ImageSequenceProcessCallback? onFinishPlaying})
-
const
Properties
-
cacheProgressIndicatorBuilder
→ CacheProgressIndicatorBuilder?
-
Use this function to display a widget until the ImageSequenceAnimator is ready to be played. This value is only used if isOnline is set to true.
final
-
color
→ Color?
-
Use this value to determine the color for your image sequence.
final
-
fileFormat
→ String
-
The file format for each image in your image sequence. For example, if the images in your image sequence are named as
'Frame_00000.png', 'Frame_00001.png', 'Frame_00002.png', 'Frame_00003.png' ...
then the fileFormat should be 'png'. This should be the same for all the images in your image sequence.
final
-
fileName
→ String
-
The file name for each image in your image sequence excluding the suffix. For example, if the images in your image sequence are named as
'Frame_00000.png', 'Frame_00001.png', 'Frame_00002.png', 'Frame_00003.png' ...
then the fileName should be 'Frame_'. This should be the same for all the images in your image sequence.
final
-
folderName
→ String
-
The directory of your image sequence.
If isOnline is set to false and, for example, if you add your image sequence to
'assets/ImageSequences/MyImageSequence'
then the folderName should be 'assets/ImageSequences/MyImageSequence'.
If isOnline is set to true and, for example, if you add your image sequence to
'https://www.domain.com/ImageSequences/MyImageSequence'
then the folderName should be 'https://www.domain.com/ImageSequences/MyImageSequence'.
folderName should be the same for all the images in your image sequence.
final
-
fps
→ double
-
The FPS for your image sequence. For example, if your frameCount is 60 and the animation is meant to run in 1 second, then your fps should
be 60.
final
-
frameCount
→ double
-
The total number of images in your image sequence.
final
-
fullPaths
→ List<String>?
-
Use this value if you would like to specify a list of endpoints for the frames in your image sequence animator. If set, values for folderName,
fileName, suffixStart, suffixCount, fileFormat and frameCount will be ignored.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
isAutoPlay
→ bool
-
Use this value to determine whether your image sequence should start playing immediately or not.
final
-
isBoomerang
→ bool
-
Use this value to determine whether your image sequence should boomerang or not.
final
-
isLooping
→ bool
-
Use this value to determine whether your image sequence should loop or not. This will override isBoomerang if both are set to true.
final
-
isOnline
→ bool
-
Set this value to true if your folderName is an online path.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onFinishPlaying
→ ImageSequenceProcessCallback?
-
The callback for when the ImageSequenceAnimator finishes playing.
final
-
onPlaying
→ ImageSequenceProcessCallback?
-
The callback for when the ImageSequenceAnimator is playing. This callback is continuously through the entire process.
final
-
onReadyToPlay
→ ImageSequenceProcessCallback?
-
The callback for when the ImageSequenceAnimator is ready to start playing.
final
-
onStartPlaying
→ ImageSequenceProcessCallback?
-
The callback for when the ImageSequenceAnimator starts playing.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
suffixCount
→ int
-
The suffix length for each image in your image sequence. Most software such as Adobe After Effects export image sequences with a suffix. For
example, if the images in your image sequence are named as
'Frame_00000.png', 'Frame_00001.png', 'Frame_00002.png', 'Frame_00003.png' ...
then the suffixCount should be 5. This should be the same for all the images in your image sequence.
final
-
suffixStart
→ int
-
The suffix for the first image in your image sequence. For example, if the first image in your image sequence is named as
'Frame_00001.png'
then suffixStart should be 1.
final
-
waitUntilCacheIsComplete
→ bool
-
Set this value to true if you want the ImageSequenceAnimator to wait until the entire image sequence is cached. Otherwise, the ImageSequenceAnimator
will invoke onReadyToPlay and start playing if isAutoPlay is set to true when it approximates that the remaining caching can be completed without
causing stutters. This value is only used if isOnline is set to true.
final