user_profile_gatekeeper 0.1.0
user_profile_gatekeeper: ^0.1.0 copied to clipboard
Ensure that your users have provided necessary profile information before they can access your app.
user_profile_gatekeeper #
Ensure that your users have provided necessary profile information before they can access your app.
Installation #
dependencies:
user_profile_gatekeeper: ^0.0.1
copied to clipboard
Usage #
Configure your required user properties using the UserProperty
class:
UserProperty(
label: 'Name', // Displayed label
get: () => 'John Doe', // A function that returns the current value
validate: (value) => value.isNotEmpty, // A function that acts as a validator for the value
save: (value) => {/* save new value */}, // A function that saves the new value to a persistent storage
)
copied to clipboard
Wrap your app with UserProfileGatekeeper
to ensure necessary profile data is collected:
UserProfileGatekeeper(
requiredUserProperties: [...],
child: HomeScreen(),
)
copied to clipboard