Skip to content

Instantly share code, notes, and snippets.

@Monik09
Created August 24, 2021 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Monik09/2b20d1816d436d3d06bd2054faa03a9e to your computer and use it in GitHub Desktop.
Save Monik09/2b20d1816d436d3d06bd2054faa03a9e to your computer and use it in GitHub Desktop.
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