create static method
Creates a new linesymbol shape painter with asynchronous initialization.
Uses a task queue to ensure thread-safe creation and caches the result in the rendering instruction to avoid duplicate creation.
Implementation
static Future<ShapePainterLinesymbol> create(RenderinstructionLinesymbol renderinstruction) async {
return _taskQueue.add(() async {
ShapePainterLinesymbol? shapePainter = PainterFactory().getPainterForSerial(renderinstruction.serial) as ShapePainterLinesymbol?;
if (shapePainter != null) return shapePainter;
shapePainter = ShapePainterLinesymbol._(renderinstruction);
await shapePainter.init();
PainterFactory().setPainterForSerial(renderinstruction.serial, shapePainter);
return shapePainter;
});
}