A new Flutter project.
This project is a dispaly head to showcase my cloud and devops skills
learning to implemet amplify as well
- install amplify cli
- $ amplify configure
- add to pubspec.yaml amplify_flutter: ^0.6.0
- $ amplify init
- amplify status
amplify auth
-
amplify_auth_cognito: ^0.6.6 to pubspec
-
$ amplify add auth
-
amplify push
-
@override initState() { super.initState(); _configureAmplify(); } Future _configureAmplify() async { // Add any Amplify plugins you want to use final authPlugin = AmplifyAuthCognito(); await Amplify.addPlugin(authPlugin);
// You can use addPlugins if you are going to be adding multiple plugins // await Amplify.addPlugins([authPlugin, analyticsPlugin]);
// Once Plugins are added, configure Amplify // Note: Amplify can only be configured once. try { await Amplify.configure(amplifyconfig); } on AmplifyAlreadyConfiguredException { print( "Tried to reconfigure Amplify; this can occur when your app restarts on Android."); } }