Skip to content
This repository has been archived by the owner on Apr 22, 2022. It is now read-only.

Latest commit

 

History

History
executable file
·
24 lines (17 loc) · 522 Bytes

README.md

File metadata and controls

executable file
·
24 lines (17 loc) · 522 Bytes

Image Saver plugin for Flutter

Saves photos to the gallery. Supports Android 16+ and IOS 8.0+

Usage

    import 'package:image_saver/image_saver.dart';


    void _onImageSaveButtonPressed() async {
      var response = await http
          .get('http://upload.art.ifeng.com/2017/0425/1493105660290.jpg');

      File savedFile = await ImageSaver.saveFile(fileData: response.bodyBytes);
      if (!mounted) {
        return;
      }
      setState(() {
        _imageFile = savedFile);
      });
    }