Factory class abstract
Factory for creating Rive rendering objects.
- Use Factory.rive for the Rive renderer (recommended) for best performance and full rendering support.
- Use Factory.flutter for the built-in Flutter renderer for smaller graphics that need to integrate with other Flutter rendering.
See the documentation on specifying a renderer.
Constructors
- Factory()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isSupported → bool
-
Whether this factory is supported on the current platform.
no setter
- nativePointerAddress → int
-
Returns the native pointer address for this factory, or 0 if not
backed by a native factory.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decodeAudio(
Uint8List bytes) → Future< AudioSource?> - Decodes audio bytes into an AudioSource for Rive audio playback.
-
decodeFont(
Uint8List bytes) → Future< Font?> - Decodes font bytes into a Font for use with Rive text.
-
decodeImage(
Uint8List bytes) → Future< RenderImage?> - Decodes image bytes into a RenderImage for use with Rive.
-
isValidRenderer(
Renderer renderer) → bool -
Checks if the given
rendereris compatible with this factory. -
makePaint(
) → RenderPaint - Creates a new RenderPaint for use with Rive.
-
makePath(
[bool initEmpty = false]) → RenderPath - Creates a new RenderPath for use with Rive.
-
makeText(
) → RenderText - Creates a new RenderText for use with Rive.
-
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
Static Properties
- flutter → Factory
-
Returns the Flutter-based factory using Skia/Impeller for rendering.
no setter
- rive → Factory
-
Returns the Rive factory (recommended). Under deferred rendering (the
default on native) this is the render context's recording session, so
resources made here record into the stream every texture replays.
no setter