zmedia_saver 0.1.0

Flutter Android iOS

After taking picture from camera or from gallery, this plugin can add image path into image library (for Android only)

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:zmedia_saver/zmedia_saver.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    await ZmediaSaver.saveToLibrary('/storage/emulated/0/Pictures/CameraApp/1566662677907.png');
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
}
2
likes
90
pub points
27%
popularity

After taking picture from camera or from gallery, this plugin can add image path into image library (for Android only)

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

ceylon.rizan@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, path, permission_handler

More

Packages that depend on zmedia_saver