All Projects → aws-amplify → Amplify Flutter

aws-amplify / Amplify Flutter

Licence: apache-2.0
A declarative library with an easy-to-use interface for building Flutter applications on AWS.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Amplify Flutter

The forge
Our groundbreaking, lightning fast PWA CLI tool
Stars: ✭ 70 (-90.13%)
Mutual labels:  aws, mobile-development
Projectlearn Project Based Learning
A curated list of project tutorials for project-based learning.
Stars: ✭ 699 (-1.41%)
Mutual labels:  mobile-development
Flutter ui challenge flight search
An advanced UI design implemented in Flutter
Stars: ✭ 642 (-9.45%)
Mutual labels:  mobile-development
Aws Vpn Server Setup
Setup your own private, secure, free* VPN on the Amazon AWS Cloud in 10 minutes. CloudFormation
Stars: ✭ 672 (-5.22%)
Mutual labels:  aws
Apai Io
DISCONTINUED Amazon Product Adverstising Library based on PHP REST and SOAP (only V1) using the Product Advertising API.
Stars: ✭ 647 (-8.74%)
Mutual labels:  aws
Control
Control manages the lifecycle of clusters on your infrastructure and allows deployment of applications via HELM. Its deployment and configuration workflows will help you to get up and running with Kubernetes faster.
Stars: ✭ 680 (-4.09%)
Mutual labels:  aws
Aws App Mesh Examples
AWS App Mesh is a service mesh that you can use with your microservices to manage service to service communication.
Stars: ✭ 640 (-9.73%)
Mutual labels:  aws
Aws Iot Device Sdk Embedded C
SDK for connecting to AWS IoT from a device using embedded C.
Stars: ✭ 708 (-0.14%)
Mutual labels:  aws
Conference App In A Box
Full stack & cross platform app customizable & themeable for any event or conference.
Stars: ✭ 693 (-2.26%)
Mutual labels:  aws
Goformation
GoFormation is a Go library for working with CloudFormation templates.
Stars: ✭ 671 (-5.36%)
Mutual labels:  aws
Startup Kit Templates
CloudFormation templates to accelerate getting started on AWS.
Stars: ✭ 669 (-5.64%)
Mutual labels:  aws
Aws Mobile React Sample
A React Starter App that displays how web developers can integrate their front end with AWS on the backend. The App interacts with AWS Cognito, API Gateway, Lambda and DynamoDB on the backend.
Stars: ✭ 650 (-8.32%)
Mutual labels:  aws
Aws Cognito Angular Quickstart
An Angular(v5)-based QuickStart single-page app utilizing Amazon Cognito, S3, and DynamoDB (Serverless architecture)
Stars: ✭ 685 (-3.39%)
Mutual labels:  aws
Aws Sam Cli
CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
Stars: ✭ 5,817 (+720.45%)
Mutual labels:  aws
Qbit
The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.
Stars: ✭ 702 (-0.99%)
Mutual labels:  aws
Practical.cleanarchitecture
Asp.Net Core 5 Clean Architecture (Microservices, Modular Monolith, Monolith) samples (+Blazor, Angular 11, React 17, Vue 2.6), Domain-Driven Design, CQRS, Event Sourcing, SOLID, Asp.Net Core Identity Custom Storage, Identity Server 4 Admin UI, Entity Framework Core, Selenium E2E Testing, SignalR Notification, Hangfire Tasks Scheduling, Health Checks, Security Headers, ...
Stars: ✭ 639 (-9.87%)
Mutual labels:  aws
Terraform Provider Aws
Terraform AWS provider
Stars: ✭ 6,624 (+834.27%)
Mutual labels:  aws
Cloudcomparer
Compare the various managed cloud services offered by the major public cloud providers in the market.
Stars: ✭ 678 (-4.37%)
Mutual labels:  aws
Archive aws Lambda Go
A fast and clean way to execute Go on AWS Lambda.
Stars: ✭ 710 (+0.14%)
Mutual labels:  aws
Reflow
A language and runtime for distributed, incremental data processing in the cloud
Stars: ✭ 706 (-0.42%)
Mutual labels:  aws

AWS Amplify

discord

Amplify Flutter

AWS Amplify provides a declarative and easy-to-use interface across different categories of cloud operations. Our default implementation works with Amazon Web Services (AWS), but AWS Amplify is designed to be open and pluggable for any custom backend or service. See AWS Amplify for further details about the Amplify Framework.

We are iterating and looking for feedback and collaboration, so please let us know your feedback on our direction and roadmap.

⚠️ For breaking changes from the developer preview versions please refer to this issue for migration details.

Supported Amplify Categories

  • [x] Authentication: APIs and building blocks for developers who want to create user authentication experiences with Amazon Cognito.

  • [x] Analytics: Easily collect analytics data for your app with Pinpoint. Analytics data includes user sessions and other custom events that you want to track in your app.

  • [x] Storage: Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets with Amazon S3.
  • [x] DataStore: A programming model for leveraging shared and distributed data without writing additional code for offline and online scenarios, which makes working with distributed, cross-user data just as simple as working with local-only data.
  • [x] API (Rest): Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4.
  • [x] API (GraphQL): Interact with your GraphQL server or AWS AppSync API with an easy-to-use & configured GraphQL client.

To Be Implemented

  • [ ] Predictions
  • [ ] Storage Hub Events (Listening to the Amplify Storage events)

Amplify for Flutter currently supports iOS and Android platforms.

Documentation

Flutter Development Guide

Amplify for Flutter is an open-source project and welcomes contributions from the Flutter community, see Contributing.

Prerequisites

Getting Started with Flutter app development and Amplify

  • Clone this repository
  • Install Amplify in a Flutter project
  • Add basic Amplify functionality to your project using one of the supported categories
  1. git clone [email protected]:aws-amplify/amplify-flutter.git

  2. Open your Flutter project. If you do not have an active Flutter project, you can create one after installing the Flutter development tooling and running flutter create <project-name> in your terminal.

  3. Using the Amplify CLI, run amplify init from the root of your project:

See Amplify CLI Installation

==> amplify init
Note: It is recommended to run this command from the root of your app directory
? Enter a name for the project helloAmplify
? Enter a name for the environment dev
? Choose your default editor: Visual Studio Code
? Choose the type of app that you\'re building flutter
Please tell us about your project
Only the following resource types are supported:
 * Auth
 * Analytics
 * Storage
 * API
? Where do you want to store your configuration file? ./lib/
  1. Add Amplify categories (choose defaults for this example):

    $ amplify add auth
    $ amplify add analytics
    
  2. Push changes to the cloud to provision the backend resources:

    $ amplify push
    
  3. In your pubspec.yaml file, add the following to dependencies:

Note: Do not include dependencies in your pubspec file that you are not using in your app. This can cause a configuration error in the underlying SDK.

dependencies:
  flutter:
    sdk: flutter
  amplify_flutter:
    path: /{path to your local amplify-flutter}/amplify-flutter/packages/amplify_flutter
  amplify_analytics_pinpoint:
    path: /{path to your local amplify-flutter}/amplify-flutter/packages/amplify_analytics_pinpoint
  amplify_auth_cognito:
    path: /{path to your local amplify-flutter}/amplify-flutter/packages/amplify_auth_cognito
  1. From the terminal run
flutter pub get
  1. In your main.dart file, add:
import 'package:flutter/material.dart';
import 'package:amplify_flutter/amplify.dart';
import 'package:amplify_analytics_pinpoint/amplify_analytics_pinpoint.dart';
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';

import 'amplifyconfiguration.dart';

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  bool _amplifyConfigured = false;

  @override
  void initState() {
    super.initState();
  }

  void _configureAmplify() async {
    if (!mounted) return;

    // Add Pinpoint and Cognito Plugins
    Amplify.addPlugin(AmplifyAuthCognito());
    Amplify.addPlugin(AmplifyAnalyticsPinpoint());

    // Once Plugins are added, configure Amplify
    try {
      await Amplify.configure(amplifyconfig);
      setState(() {
        _amplifyConfigured = true;
      });
    } on AmplifyAlreadyConfiguredException {
      print(
          "Amplify was already configured. Looks like app restarted on android.");
    }

  }

  // Send an event to Pinpoint
  void _recordEvent() async {
    AnalyticsEvent event = AnalyticsEvent('test');
    event.properties.addBoolProperty('boolKey', true);
    event.properties.addDoubleProperty('doubleKey', 10.0);
    event.properties.addIntProperty('intKey', 10);
    event.properties.addStringProperty('stringKey', 'stringValue');
    Amplify.Analytics.recordEvent(event: event);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
          appBar: AppBar(
            title: const Text('Amplify example app'),
          ),
          body: ListView(padding: EdgeInsets.all(10.0), children: <Widget>[
            Center(
              child: Column (
                children: [
                  const Padding(padding: EdgeInsets.all(5.0)),
                  ElevatedButton(
                    onPressed: _amplifyConfigured ? null : _configureAmplify,
                    child: const Text('configure Amplify')
                  ),
                  ElevatedButton(
                    onPressed: _amplifyConfigured ? _recordEvent : null,
                    child: const Text('record event')
                  )
                ]
              ),
            )
          ])
      )
    );
  }
}

For iOS builds complete the following steps (from the root of your project):

  • rm ios/Podfile
  • flutter build ios
  • Modify the ios/Podfile and replace the second line with: platform :ios, '11.0'.

This ensures that your Flutter project is running the same ios version that the Amplify plugins are built on.

  1. From the root of your project, execute flutter run in the terminal.

Make sure that an Android or iOS device is already running; this can be a virtual device started from Android Studio.

Click Configure Amplify, then Record Event. From the terminal (in the root of your project) run amplify console analytics. This will open the Amazon Pinpoint console for your project in your default web browser. Within about a minute you should start seeing the events populating in the Events section of then Pinpoint console.

For further documentation and Amplify Category API usage, see the documentation.


Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].