Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.68 KB | None | 0 0
  1.  
  2.   Future<void> _notifyGallery(String path) async {
  3.     try {
  4.       await platform.invokeMethod('notifyGallery', {"path": path});
  5.     } on PlatformException catch (e) {
  6.       print("Failed to notify gallery: '${e.message}'.");
  7.     }
  8.   }
  9.  
  10.   Future<void> _shareImage(String path) async {
  11.     try {
  12.       await platform.invokeMethod('shareImage', {"path": path});
  13.     } on PlatformException catch (e) {
  14.       print("Failed to share: '${e.message}.");
  15.     }
  16.   }
  17.  
  18.   Future<void> _openImage(String path) async {
  19.     try {
  20.       await platform.invokeMethod('openImage', {"path": path});
  21.     } on PlatformException catch (e) {
  22.       print("Failed to share: '${e.message}.");
  23.     }
  24.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement