shareImageFromUrl static method
Implementation
static Future<void> shareImageFromUrl(String? imageUrl, String? text) async {
if (kIsWeb) {
String? value =
text != null && text.isNotEmpty ? '$text - $imageUrl' : imageUrl;
await Clipboard.setData(ClipboardData(text: value));
showFlushBar(value: true, textTrue: "Texto copiado");
} else {
Uint8List? bytes =
await (ModernFormDownloadHelper.downloadWithProgress(imageUrl));
if (bytes != null) {
await shareImage(bytes, text);
}
}
}