gallery_saver 2.0.1
https://pub.dev/packages/gallery_saver#-readme-tab-
dependencies:
gallery_saver: ^2.0.1
projet > android > app > src > debug > AndroidManifest.xml
projet > android > app > src > profile > AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ai.example.candy">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
...
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
import 'package:gallery_saver/gallery_saver.dart';
onpressed : () {
var file = 'https://pbs.twimg.com/media/CXs84g6UEAARaiV.jpg';
GallerySaver.saveImage(file)
.then((value) => print('>>>> save value= $value'))
.catchError((err) {
print('error :( $err');
});
}
감사합니다! 덕분에 저장 성공했어요 ㅠㅠ