getOrCreateSymbol method
Loads and returns the desired symbol with optional scaling.
Retrieves a symbol from the cache or loads it from the source if not cached. The symbol can be automatically scaled to the specified dimensions while maintaining aspect ratio and visual quality.
src Source path or identifier for the symbol
width Target width for scaling, 0 to maintain original
height Target height for scaling, 0 to maintain original
Returns SymbolImage or null if loading fails
Implementation
Future<SymbolImage?> getOrCreateSymbol(String src, int width, int height) async {
return symbolCache.getOrCreateSymbol(src, width, height);
}