FlareActor class
A widget that displays a Flare.
Several constructors are provided for the various ways that a Flare can be specified:
- FlareActor, for obtaining a Flare from an asset filename.
- FlareActor.asset, for obtaining a Flare from an AssetProvider.
- FlareActor.bundle, for obtaining a Flare from an AssetBundle.
- FlareActor.memory, for obtaining a Flare from a Uint8List.
- Inheritance
Constructors
- FlareActor(String? filename, {String? boundsNode, String? animation, BoxFit fit = BoxFit.contain, Alignment alignment = Alignment.center, bool isPaused = false, bool snapToEnd = false, FlareController? controller, FlareCompletedCallback? callback, Color? color, bool shouldClip = true, bool sizeFromArtboard = false, String? artboard, bool antialias = true})
-
const
- FlareActor.asset(AssetProvider? flareProvider, {String? boundsNode, String? animation, BoxFit fit = BoxFit.contain, Alignment alignment = Alignment.center, bool isPaused = false, bool snapToEnd = false, FlareController? controller, FlareCompletedCallback? callback, Color? color, bool shouldClip = true, bool sizeFromArtboard = false, String? artboard, bool antialias = true})
-
const
- FlareActor.bundle(String name, {String? boundsNode, String? animation, BoxFit fit = BoxFit.contain, Alignment alignment = Alignment.center, bool isPaused = false, bool snapToEnd = false, FlareController? controller, FlareCompletedCallback? callback, Color? color, bool shouldClip = true, bool sizeFromArtboard = false, String? artboard, bool antialias = true, AssetBundle? bundle})
- FlareActor.memory(Uint8List bytes, {String? boundsNode, String? animation, BoxFit fit = BoxFit.contain, Alignment alignment = Alignment.center, bool isPaused = false, bool snapToEnd = false, FlareController? controller, FlareCompletedCallback? callback, Color? color, bool shouldClip = true, bool sizeFromArtboard = false, String? artboard, bool antialias = true})
Properties
- alignment → Alignment
-
The alignment that will be applied in conjuction to the fit to align
the Flare content within the bounds of this widget.
final
- animation → String?
-
The name of the animation to play.
final
- antialias → bool
-
When false disables antialiasing on drawables.
final
- artboard → String?
-
The name of the artboard to display.
final
- boundsNode → String?
-
The name of the node to use to determine the bounds of the content.
When null it will default to the bounds of the artboard.
final
- callback → FlareCompletedCallback?
-
Callback invoked when animation has completed. If animation is looping
this callback is never invoked.
final
- color → Color?
-
The color to override any fills/strokes with.
final
- controller → FlareController?
-
The FlareController used to drive animations/mixing/procedural hierarchy
manipulation of the Flare contents.
final
- filename → String?
-
Name of the Flare file to be loaded from the AssetBundle.
final
- fit → BoxFit
-
The BoxFit strategy used to scale the Flare content into the
bounds of this widget.
final
- flareProvider → AssetProvider?
-
The Flare asset to display.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isPaused → bool
-
When true, animations do not advance.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldClip → bool
-
When true, the Flare content will be clipped against the bounds of this
widget.
final
- sizeFromArtboard → bool
-
When true the intrinsic size of the artboard will be used as the
dimensions of this widget.
final
- snapToEnd → bool
-
When true, the animation will be applied at the end of its duration.
final
Methods
-
createElement(
) → LeafRenderObjectElement -
RenderObjectWidgets always inflate to a RenderObjectElement subclass.
inherited
-
createRenderObject(
BuildContext context) → RenderObject -
Creates an instance of the RenderObject class that this
RenderObjectWidget represents, using the configuration described by this
RenderObjectWidget.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
didUnmountRenderObject(
covariant FlareActorRenderObject renderObject) → void -
A render object previously associated with this widget has been removed
from the tree. The given RenderObject will be of the same type as
returned by this object's createRenderObject.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
-
updateRenderObject(
BuildContext context, covariant FlareActorRenderObject renderObject) → void -
Copies the configuration described by this RenderObjectWidget to the
given RenderObject, which will be of the same type as returned by this
object's createRenderObject.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited