AiutaDataProvider constructor

AiutaDataProvider({
  1. required ValueListenable<bool> isUserConsentObtained,
  2. required ValueListenable<List<AiutaHistoryImage>> uploadedImages,
  3. required ValueListenable<List<AiutaHistoryImage>> generatedImages,
  4. required AiutaDataListeners listeners,
})

Create a new instance of AiutaDataProvider.

Implementation

AiutaDataProvider({
  required this.isUserConsentObtained,
  required this.uploadedImages,
  required this.generatedImages,
  required this.listeners,
})  : _isUserConsentObtained = isUserConsentObtained.value,
      _uploadedImages = uploadedImages.value,
      _generatedImages = generatedImages.value {
  isUserConsentObtained.addListener(() {
    _isUserConsentObtained = isUserConsentObtained.value;
  });
  uploadedImages.addListener(() {
    _uploadedImages = uploadedImages.value;
  });
  generatedImages.addListener(() {
    _generatedImages = generatedImages.value;
  });
}