Skip to content

Commit

Permalink
chore: change amplifyconfiguration.dart import to amplify_outputs.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
khatruong2009 committed Jun 19, 2024
1 parent 2088b91 commit 6680d2f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> _configureAmplify() async {
// Add Pinpoint and Cognito Plugins, and any other plugins you want to use
Expand All @@ -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<void> _configureAmplify() async {
// ...
Expand All @@ -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<void> _configureAmplify() async {
// Add any Amplify plugins you want to use
Expand All @@ -361,7 +361,7 @@ Future<void> _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.',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> main() async {
try {
Expand All @@ -410,7 +410,7 @@ Future<void> main() async {
Future<void> _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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> _configureAmplify() async {
try {
Expand Down

0 comments on commit 6680d2f

Please sign in to comment.