Added image util providers

parent dd57c792
import 'package:flutter/material.dart';
class ImageUtilProvider extends ChangeNotifier {
ImageProvider? _image;
String? _imagePath;
String imageUrl = '';
String? get imagePath => _imagePath;
ImageProvider? get image => _image;
set image(ImageProvider? image) {
_image = image;
notifyListeners();
}
set imagePath(String? imagePath) {
_imagePath = imagePath;
notifyListeners();
}
void clearImage() {
_image = null;
_imagePath = null;
notifyListeners();
}
void setImageUrl(String url) {
imageUrl = url;
notifyListeners();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment