FLUTTER ECOSYSTEM

dart_earcut

Performant triangulation algorithm based on https://github.com/mapbox/earcut

Latest version
1.2.0
30-day downloads
716K
Likes
10
Pub points
150

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

dart_earcut is a high-performance triangulation library for Dart, implementing the Earcut algorithm originally developed by Mapbox. It efficiently converts polygonal shapes into triangles, making it ideal for rendering complex geometries in 2D graphics and visualization applications. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, ensuring cross-platform consistency. Designed for speed and accuracy, it handles both simple and complex polygons with holes, providing reliable results for computational geometry tasks.

Use cases
  • 2D game development
  • Web-based map rendering
  • Vector graphics processing
  • Interactive data visualization
  • Mesh generation for UI components
Key features
  • Fast triangulation performance
  • Supports polygons with holes
  • Cross-platform compatibility
  • Simple API for polygon input
  • Accurate results for complex shapes
Suitable for
  • Graphics developers
  • GIS application creators
  • UI/UX designers working with custom shapes
  • Game engine integrators
  • Data visualization engineers
Considerations
  • Requires valid polygon input (non-intersecting edges)
  • Not optimized for real-time dynamic updates
  • Limited to 2D triangulation
  • Does not handle self-intersecting polygons directly
  • May need preprocessing for irregular inputs
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add dart_earcut

Categories

Source repository

Related projects