flutter_cognito_plugin 0.3.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 61

Sponsor pub package

Flutter Cognito Plugin #

An AWS Cognito plugin for flutter. Supports both iOS and Android.

Installation #

First follow the regular flutter plugin installation on Dart Pub.

Make sure you have built the app once for both Android/iOS before continuing.


Since this plugin uses the native AWS sdk, the installation is a little more involved.

Android #

Add an awsconfiguration.json file to android/app/src/main/res/raw/awsconfiguration.json.

This is what one should look like :-

{
    "IdentityManager": {
        "Default": {}
    },
    "CredentialsProvider": {
        "CognitoIdentity": {
            "Default": {
                "PoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab",
                "Region": "XX-XXXX-X"
            }
        }
    },
    "CognitoUserPool": {
        "Default": {
            "PoolId": "XX-XXXX-X_abcd1234",
            "AppClientId": "XXXXXXXX",
            "AppClientSecret": "XXXXXXXXX",
            "Region": "XX-XXXX-X"
        }
    }
}

This plugin supports the amplify SDK for android and iOS, and the the amplify cli can be used to generate the awsconfiguration.json file.

Just do $ amplify init from the android & ios folder of your app.

iOS #

Run $ pod init from the ios folder of your app.

Now, open ios/Podfile. Ensure ios version is set to a minimum of 9.0.

platform :ios, '9.0'

To add the awsconfiguration.json file to iOS module, you will unfortunately, need to open up your project in XCode.

  1. Start Xcode
  2. Click on ‘File > Open’
  3. Select the ios/Runner.xcworkspace file.

Now just drag-drop the awsconfiguration.json file, from android/app/src/main/res/raw/awsconfiguration.json to XCode Runner (Right next to AppDelegate.swift).

Here is a video.

That should create a symlink to the file in the ios module, and bundle it into the final ios app.

This way you won't need to maintain 2 config files.

Usage #

The plugin comes with a showcase app that will let you try all features; see if you setup the awsconfiguration.json correctly.

It's present in the usual example directory

$ git clone https://github.com/pycampers/flutter_cognito_plugin.git
$ cd flutter_cognito_plugin/example
$ flutter run

0.0.1 #

  • TODO: Describe initial release.

example/README.md

flutter_cognito_plugin_example #

Demonstrates how to use the flutter_cognito_plugin plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

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

Use this package as a library

1. Depend on it

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


dependencies:
  flutter_cognito_plugin: ^0.3.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:flutter_cognito_plugin/flutter_cognito_plugin.dart';
  
Version Uploaded Documentation Archive
0.3.3 Jun 12, 2019 Go to the documentation of flutter_cognito_plugin 0.3.3 Download flutter_cognito_plugin 0.3.3 archive
0.3.2 Jun 12, 2019 Go to the documentation of flutter_cognito_plugin 0.3.2 Download flutter_cognito_plugin 0.3.2 archive
0.3.1 May 25, 2019 Go to the documentation of flutter_cognito_plugin 0.3.1 Download flutter_cognito_plugin 0.3.1 archive
0.3.0 May 25, 2019 Go to the documentation of flutter_cognito_plugin 0.3.0 Download flutter_cognito_plugin 0.3.0 archive
0.2.2 May 11, 2019 Go to the documentation of flutter_cognito_plugin 0.2.2 Download flutter_cognito_plugin 0.2.2 archive
0.2.1 May 9, 2019 Go to the documentation of flutter_cognito_plugin 0.2.1 Download flutter_cognito_plugin 0.2.1 archive
0.1.0 May 2, 2019 Go to the documentation of flutter_cognito_plugin 0.1.0 Download flutter_cognito_plugin 0.1.0 archive
0.0.12 Apr 19, 2019 Go to the documentation of flutter_cognito_plugin 0.0.12 Download flutter_cognito_plugin 0.0.12 archive
0.0.11 Apr 18, 2019 Go to the documentation of flutter_cognito_plugin 0.0.11 Download flutter_cognito_plugin 0.0.11 archive
0.0.10 Apr 17, 2019 Go to the documentation of flutter_cognito_plugin 0.0.10 Download flutter_cognito_plugin 0.0.10 archive

All 19 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
55
Health:
Code health derived from static analysis. [more]
56
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Jun 14, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.1
  • pana: 0.12.17
  • Flutter: 1.5.4-hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Fix lib/flutter_cognito_plugin.dart. (-43.75 points)

Analysis of lib/flutter_cognito_plugin.dart failed with 2 errors:

line 122 col 22: The method 'removeMethodCallHandlerByName' isn't defined for the class 'PluginScaffold'.

line 128 col 20: The method 'setMethodCallHandler' isn't defined for the class 'PluginScaffold'.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
logging ^0.11.3+2 0.11.3+2
plugin_scaffold ^1.0.1 1.1.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test