Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment