Created
September 8, 2019 09:23
-
-
Save divyanshub024/afc15441dd8336309857379f284d8f13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Future<void> _setWallpaper(int wallpaperType) async { | |
var file = | |
await DefaultCacheManager().getSingleFile(widget.model.largeImageURL); | |
try { | |
final int result = await platform | |
.invokeMethod('setWallpaper', [file.path, wallpaperType]); | |
print('Wallpaer Updated.... $result'); | |
} on PlatformException catch (e) { | |
print("Failed to Set Wallpaer: '${e.message}'."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment