toJson abstract method

Map<String, Object?> toJson()

Converts to a JSON-safe map, see Scene.toJson. A subclass added outside this file (per this class's own doc comment above) needs its own toJson override, plus a decoder registered via LayerRegistry.registerImageSource to round-trip through Scene.fromJson.

Implementation

Map<String, Object?> toJson();