0

I have made a wallpaper app using Flutter. I have used the below package to help user set the wallpaper as HOME, LOCK or BOTH screens. But after setting any image to wallpaper, the whole app gets restarted.

package ss

Please help/guide me.

 

    Future<void> _setwallpaper(imagePath, location) async {
        var file = await DefaultCacheManager().getSingleFile(imagePath);
    
       
          WallpaperManagerFlutter().setwallpaperfromFile(file, location);
    
       }

I tried other packages like wallpaper & flutter_wallpaper_manager. But same issue exists with these packages as well.

0 Answers0