apptive_grid_user_management 0.0.5-alpha.2 apptive_grid_user_management: ^0.0.5-alpha.2 copied to clipboard
Package to add UserManagement through ApptiveGrid to a Flutter App. This provides Login/Register Widgets and options to confirm accoutns
ApptiveGrid UserManagement #
Setup #
Add a ApptiveGridUserManagment
to your Widget tree. Ideally close to the ApptiveGrid
Widget
ApptiveGrid(
child: ApptiveGridUserManagement(
group: 'YOUR_GROUP_ID',
onChangeEnvironment: (newEnvironment) async {},
confirmAccountPrompt: (confirmationWidget) {
// Show confirmationWidget
},
onAccountConfirmed: (loggedIn) {
// Handle account confirmed
},
child: MyApp(),,
),
)
Android #
Add the following entries to your AndroidManifest
to be able to open confirmation links
<activity>
...
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="alpha.apptivegrid.de"
android:pathPattern="/auth/regio4all/confirm/.*"
android:scheme="YOUR_SCHEME"/>
<data
android:host="beta.apptivegrid.de"
android:pathPattern="/auth/regio4all/confirm/.*"
android:scheme="YOUR_SCHEME"/>
<data
android:host="app.apptivegrid.de"
android:pathPattern="/auth/regio4all/confirm/.*"
android:scheme="YOUR_SCHEME"/>
</intent-filter>
</activity>
##iOS Do the following to open confirmation Links
- Using Universal Links (https as scheme)
Runner.entitlements
<key>com.apple.developer.associated-domains</key> <array> <string>applinks:*.apptivegrid.de</string> </array>
- Using custom schema in
Info.plist
<key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLSchemes</key> <array> <string>YOUR_SCHEMA</string> </array> </dict> </array>
Show Login/Registration Content #
On your Screens add a ApptiveGridUserManagementContent
Widget to your layout. That's all. The themeing will be taken from your App's theme
Card(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ApptiveGridUserManagementContent(
initialContentType: ContentType.login,
onLogin: () {
context.go('/home');
},
),
)