Skip to content

Latest commit

 

History

History
executable file
·
35 lines (23 loc) · 922 Bytes

README.md

File metadata and controls

executable file
·
35 lines (23 loc) · 922 Bytes

Image Picker and Saver plugin for Flutter

pub package

Android supported

IOS supported 8.0+

Saves photos to the gallery.

Installation

click the pub version icon to read hwo to install this plugin.

Save image Example

    import 'package:image_picker_saver/image_picker_saver.dart';


    void _onImageSaveButtonPressed() async {
      print("_onImageSaveButtonPressed");
      var response = await http
          .get('http://upload.art.ifeng.com/2017/0425/1493105660290.jpg');
  
      debugPrint(response.statusCode.toString());
  
      var filePath = await ImagePickerSaver.saveFile(
          fileData: response.bodyBytes);
  
      var savedFile= File.fromUri(Uri.file(filePath));
      setState(() {
        _imageFile = Future<File>.sync(() => savedFile);
      });
    }