select method Null safety
- ImageSource source
Select an image from the source
to be used as the wallpaper for sharing
Implementation
Future<void> select(ImageSource source) async {
XFile? file = await picker.pickImage(
source: source,
imageQuality: desiredQuality,
);
if (file == null) {
return;
}
wallpaperModel(WallpaperModel.file(file.path));
}