Created
September 22, 2020 05:30
-
-
Save adamcyber1/539d8303e17caf5c9b605ae5bd7b8f48 to your computer and use it in GitHub Desktop.
Doogle Grive configure
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
void configureAmplify() async { | |
if (!mounted) return; | |
try { | |
AmplifyAnalyticsPinpoint analyticsPlugin = AmplifyAnalyticsPinpoint(); | |
AmplifyAuthCognito authPlugin = AmplifyAuthCognito(); | |
AmplifyStorageS3 storage = AmplifyStorageS3(); | |
// Authentication -> AWS Cognito | |
// Analytics -> AWS Pinpoint | |
// Storage -> AWS S3 | |
amplifyInstance.addPlugin( | |
authPlugins: [authPlugin], | |
analyticsPlugins: [analyticsPlugin], | |
storagePlugins: [storage]); | |
await amplifyInstance.configure(amplifyconfig); | |
} catch (e) { | |
print(e.toString()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment