mnmbase 0.0.2 copy "mnmbase: ^0.0.2" to clipboard
mnmbase: ^0.0.2 copied to clipboard

A new flutter plugin project.

example/lib/main.dart

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

import 'package:mnmbase/mnmbase.dart';

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

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

class _MyAppState extends State<MyApp> {
  final List<StreamSubscription> _subscriptions = [];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            children: <Widget>[
              RaisedButton(
                child: Text('Pick Image'),
                onPressed: () async {
                  final path = await MNMBase.pickImage();
                  print(path);
                },
              ),
              RaisedButton(
                child: Text('Pick Document'),
                onPressed: () async {
                  final path = await MNMBase.pickDocument();
                  print(path);
                },
              ),
              RaisedButton(
                child: Text('Pick Document With Images'),
                onPressed: () async {
                  final path = await MNMBase.pickDocumentWithImage();
                  print(path);
                },
              ),
              RaisedButton(
                child: Text('Pick Video'),
                onPressed: () async {
                  final path = await MNMBase.pickVideo();
                  print(path);
                },
              ),
            ],
          ),
        ),
      ),
    );
  }

  @override
  void dispose() {
    _subscriptions.forEach((s) => s.cancel());
    super.dispose();
  }

}
0
likes
20
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on mnmbase