Created
August 24, 2021 13:14
-
-
Save Monik09/2b20d1816d436d3d06bd2054faa03a9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:amplify_analytics_pinpoint/amplify_analytics_pinpoint.dart'; | |
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart'; | |
import 'package:amplify_flutter/amplify.dart'; | |
void _configureAmplify() async { | |
if (!mounted) return; | |
AmplifyAuthCognito authPlugin = AmplifyAuthCognito(); | |
AmplifyAnalyticsPinpoint analyticsPlugin = AmplifyAnalyticsPinpoint(); | |
Amplify.addPlugins([authPlugin, analyticsPlugin]); | |
try { | |
await Amplify.configure(amplifyconfig); | |
setState(() { | |
_amplifyConfigured = true; | |
}); | |
} catch (e) { | |
print(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment