addLayer method

Future<void> addLayer(
  1. String imagePath
)

Добавление слоя

Implementation

Future<void> addLayer(String imagePath) async {
  if (_comics == null) return;

  final layer = await Layer.create(imagePath, _scroll, false);
  if (layer != null) {
    _comics!.layers.add(layer);
    _layers.add(LayerViewModel(this, layer));
    notifyListeners();
  }
}