PolygonPainterFillMethod enum
The method used by the painter to fill polygons and resolve overlaps & intersections
Each method has its own advantages and disadvantages.
Values
- evenOdd → const PolygonPainterFillMethod
-
Uses
PathFillType.evenOddwithPath().addPolygonThis gives the best performance, and works on the web. However, it yields unintended results in certain edge cases when polygons intersect when PolygonLayer.invertedFill is used, or when polygon holes intersect with other holes.
- pathCombine → const PolygonPainterFillMethod
-
Uses
Path.combineThis always gives the best results on non-web platforms. However, it always yields unintended results on the web (due to a Flutter issue), and has slightly worse performance.
The hit to performance is unlikely to be significant or even noticable in many applications, but applications drawing many polygons may see a slow of about 2ms (as tested in the example app's stress test). Profile your project to determine whether switching methods is suitable, especially if there is no visual difference.
See https://github.com/flutter/flutter/issues/124675 for the Flutter issue preventing this method from working on the web.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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
Constants
-
values
→ const List<
PolygonPainterFillMethod> - A constant List of the values in this enum, in order of their declaration.