rive_markup library
Rive markup (.rml) conversion backed by packages/rml. Editor-only: the native symbols are excluded from flutter_runtime builds, so this library must never be imported from runtime code paths.
Classes
- RmlCompileResult
-
The outcome of compiling a markup document into
.revbytes: exactly one of bytes and error is set.
Properties
- markupAvailable → bool
-
Whether the loaded native library carries the markup symbols. False in
flutter_runtime builds, where rml is excluded (editor-only); callers (and
tests) must check before using revToRml or rmlToRev -- the
lazily-initialized lookups below throw on first use otherwise. Both
directions are probed: they come from one translation unit, so a library
carrying only one of them is a stale build, and failing closed sends
callers down their fallback instead of throwing.
final
Functions
-
revToRml(
Uint8List revBytes) → Uint8List? - Converts the bytes of a .rev file into the equivalent .rml markup document, with every payload embedded. Returns null when the bytes are not a readable .rev.
-
rmlToRev(
Uint8List rmlBytes) → RmlCompileResult -
Compiles a .rml markup document into the equivalent .rev bytes -- the
inverse of revToRml. Every payload the document needs must be embedded
in it: a
file=reference has no directory to resolve against here and compiles as an error.