context property

Path? get context

Context used to render the path.

final context = …;
final path = GeoPath()..context = context;

path.context; // context

If the context is null, then the path generator will return an SVG path string; if the context is non-null, the path generator will instead call methods on the specified context to render geometry. The context must implement the Path interface.

Defaults to null.

Implementation

Path? get context => _context;
set context (Path? context)

Implementation

set context(Path? context) {
  _sink = (_context = context) != null
      ? GeoPathContext(context!)
      : GeoPathString();
}