setOpacity method
Set the opacity of a layer (0.0 to 1.0).
Implementation
Future<void> setOpacity(String layerId, double opacity) async {
final item = _findItem(layerId);
if (item == null) return; // Not a catalog layer, skip silently
if (!_ensured.contains(layerId)) {
await ensure(layerId);
}
_layerState[layerId]?['opacity'] = opacity;
_applyStateChanges(layerId);
}