account_manager_plugin 0.0.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 74

account_manager_plugin #

This plugin allows Flutter apps to obtain all accounts registered in the user's device.

Usage #

Support only for Android. Added permission in the Manifests:

        android:maxSdkVersion="22" />

If the plugin is invoked on iOS, it will crash your app. In checked mode, we assert that the platform should be Android.

Use it by specifying action:

if (platform.isAndroid) {
    try {
      List<dynamic> accounts = await AccountManagerPlugin.getAccounts;
    } on PlatformException {}

Getting Started #

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

0.0.3 #

  • Fixed problem when building the construction project: 'Failed to transform file 'flutter.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform'

0.0.2 #

  • Added dart doc.
  • Fix issues and suggestions.

0.0.1 #

  • Initial release.


import 'package:flutter/material.dart';

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

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

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

class _MyAppState extends State<MyApp> {
  final GlobalKey<ScaffoldState> _scaffoldKey = new GlobalKey<ScaffoldState>();  
  String _currentAccounts = '';
  List<dynamic> accounts = List();
  Future<List<DropdownMenuItem<String>>> _dropDownMenuItems;

  void initState() {
    _dropDownMenuItems = initDataState();

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        key: _scaffoldKey,
        appBar: AppBar(
          title: const Text('Plugin AccountManager'),
        body: Center(
            child: Column(
          children: <Widget>[
                future: _dropDownMenuItems,
                builder: (BuildContext context,
                    AsyncSnapshot<List<DropdownMenuItem<String>>> snapshot) {
                  if (snapshot.hasData) {
                    return Column(
                      children: <Widget>[
                          value: _currentAccounts,
                          onChanged: changedDropDownItem,
                          padding: const EdgeInsets.all(8.0),
                          child: Text("Size Account: ${}"),
                  } else {
                    return DropdownButton<String>(
                      value: _currentAccounts,
                      onChanged: changedDropDownItem,
                      items: [
                        DropdownMenuItem(value: "mail", child: new Text('mail'))
              padding: EdgeInsets.all(16.0),

  Future<List<DropdownMenuItem<String>>> initDataState() async {
    try {
      accounts = await AccountManagerPlugin.getAccounts;
    } on PlatformException {}

    return getDropDownMenuItems(accounts);

  Future<List<DropdownMenuItem<String>>> getDropDownMenuItems(
      List<dynamic> list) async {
    List<DropdownMenuItem<String>> items = new List();
    if (list.length > 0) {
      items.add(new DropdownMenuItem(
          value: '', child: new Text('')));
      for (String mail in list.whereType<String>()) {
        debugPrint('ACCOUNT: $mail');
        items.add(new DropdownMenuItem(value: mail, child: new Text('$mail')));
      items.forEach((f) => print('Value List: ${f.value}'));
    } else {
      items.add(new DropdownMenuItem(value: 'Vacio', child: new Text('Vacio')));

    return items;

  void changedDropDownItem(String selectedAccount) {
    setState(() {
      _currentAccounts = selectedAccount;
            .showSnackBar(SnackBar(content: Text('Account: $_currentAccounts select')));

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  account_manager_plugin: ^0.0.3

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:account_manager_plugin/account_manager_plugin.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Mar 30, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6
  • Flutter: 1.12.13+hotfix.8

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies