import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:momo/models/image_resp.dart';

class GalleryNotifier extends Notifier<List<ImageResp>> {
  @override
  List<ImageResp> build() {
    return [];
  }

  void addImage({required List<ImageResp> imageList}) {
    state = [...state, ...imageList];
  }

  void clearImage() {
    state = [];
  }
}

final galleryProvider =
    NotifierProvider<GalleryNotifier, List<ImageResp>>(() => GalleryNotifier());
