From 6680d2f9057aa0bbe45c06ffef65b2a6d81d9142 Mon Sep 17 00:00:00 2001 From: Kha Truong <64438356+khatruong2009@users.noreply.github.com> Date: Wed, 19 Jun 2024 16:16:34 -0700 Subject: [PATCH] chore: change amplifyconfiguration.dart import to amplify_outputs.dart --- .../add-aws-services/analytics/set-up-analytics/index.mdx | 8 ++++---- .../[platform]/build-a-backend/auth/set-up-auth/index.mdx | 4 ++-- .../[platform]/build-a-backend/data/set-up-data/index.mdx | 2 +- .../build-a-backend/storage/set-up-storage/index.mdx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx b/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx index dba46c789b2..b6ca288e84f 100644 --- a/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx +++ b/src/pages/[platform]/build-a-backend/add-aws-services/analytics/set-up-analytics/index.mdx @@ -300,7 +300,7 @@ import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; Future _configureAmplify() async { // Add Pinpoint and Cognito Plugins, and any other plugins you want to use @@ -324,7 +324,7 @@ import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; Future _configureAmplify() async { // ... @@ -350,7 +350,7 @@ import 'package:amplify_analytics_pinpoint/amplify_analytics_pinpoint.dart'; import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; import 'package:flutter/material.dart'; -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; Future _configureAmplify() async { // Add any Amplify plugins you want to use @@ -361,7 +361,7 @@ Future _configureAmplify() async { // Once Plugins are added, configure Amplify // Note: Amplify can only be configured once. try { - await Amplify.configure(outputs); + await Amplify.configure(amplifyConfig); } on AmplifyAlreadyConfiguredException { safePrint( 'Tried to reconfigure Amplify; this can occur when your app restarts on Android.', diff --git a/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx b/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx index 6b3ba176d93..0585eed84db 100644 --- a/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx +++ b/src/pages/[platform]/build-a-backend/auth/set-up-auth/index.mdx @@ -394,7 +394,7 @@ import 'package:amplify_authenticator/amplify_authenticator.dart'; import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; Future main() async { try { @@ -410,7 +410,7 @@ Future main() async { Future _configureAmplify() async { try { await Amplify.addPlugin(AmplifyAuthCognito()); - await Amplify.configure(outputs); + await Amplify.configure(amplifyConfig); safePrint('Successfully configured'); } on Exception catch (e) { safePrint('Error configuring Amplify: $e'); diff --git a/src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx b/src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx index 51e1157542e..020a66c5ef7 100644 --- a/src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx +++ b/src/pages/[platform]/build-a-backend/data/set-up-data/index.mdx @@ -332,7 +332,7 @@ import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:flutter/material.dart'; // highlight-start -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; import 'models/ModelProvider.dart'; // highlight-end diff --git a/src/pages/[platform]/build-a-backend/storage/set-up-storage/index.mdx b/src/pages/[platform]/build-a-backend/storage/set-up-storage/index.mdx index b66ded147a5..0918ea16bbe 100644 --- a/src/pages/[platform]/build-a-backend/storage/set-up-storage/index.mdx +++ b/src/pages/[platform]/build-a-backend/storage/set-up-storage/index.mdx @@ -446,7 +446,7 @@ import 'package:amplify_flutter/amplify_flutter.dart'; import 'package:amplify_storage_s3/amplify_storage_s3.dart'; import 'package:flutter/material.dart'; -import 'amplifyconfiguration.dart'; +import 'amplify_outputs.dart'; Future _configureAmplify() async { try {