meld_core 1.0.0 copy "meld_core: ^1.0.0" to clipboard
meld_core: ^1.0.0 copied to clipboard

Pure Dart geometry, matching, interpolation and spring engine for Meld.

meld_core #

pub package CI MIT license

Pure Dart geometry planning for Meld. It has no Flutter or platform dependency, so the same deterministic plan can run in Dart VM, isolates, servers, and Flutter applications.

Install #

dependencies:
  meld_core: ^1.0.0
import 'package:meld_core/meld_core.dart';

const from = PathDataSource('M3 6H21M3 12H21M3 18H21');
const to = PathDataSource('M5 5L19 19M19 5L5 19');

final engine = MeldEngine();
final plan = engine.plan(from, to);
final frame = allocateOutputs(plan);
interpolatePlan(plan, 0.5, frame);

The engine handles SVG commands and primitives, viewBox fitting, arc-length sampling, subpath matching, topology-aware alignment, similarity transforms, spring stepping, bounded caches, diagnostics, and JSON plan serialization. Endpoint frames remain canonical while flight frames use reusable typed buffers. Set maxCacheBytes when an application needs a tighter memory budget; the retained byte estimate is available from engine.cacheStats.

Sources carry the paint intent used by Flutter's MeldPaintStyle.original: PathDataSource, GeometrySource, and CubicSource accept explicit MeldSourcePaintStyle values, while SvgMarkupSource derives fill, stroke, or both from inline SVG paint attributes unless overridden.

1
likes
130
points
105
downloads

Documentation

API reference

Publisher

verified publisherfluttercandies.com

Weekly Downloads

Pure Dart geometry, matching, interpolation and spring engine for Meld.

Repository (GitHub)
View/report issues
Contributing

Topics

#animation #geometry #icons #vector

License

MIT (license)

More

Packages that depend on meld_core