documents_picker 1.0.0

Flutter Android iOS

Simple way to get documents from local storage or ICloud(For IOS).

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:documents_picker/documents_picker.dart';

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

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

class _MyAppState extends State<MyApp> {
  List<String> docPaths;

  void _getDocuments() async {
    docPaths = await DocumentsPicker.pickDocuments;

    if (!mounted) return;
    setState(() {});
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.center,
            children: <Widget>[
              FlatButton(
                child: Text('Get documents'),
                onPressed: _getDocuments,
              ),
              if (docPaths != null)
                Text(docPaths.join('\n'))
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
80
pub points
86%
popularity

Simple way to get documents from local storage or ICloud(For IOS).

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

luuubritto@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on documents_picker