permission 0.0.5 copy "permission: ^0.0.5" to clipboard
permission: ^0.0.5 copied to clipboard

outdated

A new Flutter plugin for permission.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:permission/permission.dart';

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

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

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Plugin example app'),
        ),
        body: Center(
          child: RaisedButton(onPressed: getPermissionStatus, child: new Text("Get permission status")),
        ),
      ),
    );
  }

  getPermissionStatus() async {
    var res = await Permission.getPermissionStatus([PermissionName.Camera, PermissionName.AccessFineLocation]);
    print(res);
  }
}
33
likes
0
pub points
86%
popularity

Publisher

unverified uploader

A new Flutter plugin for permission.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on permission