mirror of
https://github.com/Iconica-Development/flutter_registration.git
synced 2025-05-18 21:23:43 +02:00
63 lines
2.6 KiB
Markdown
63 lines
2.6 KiB
Markdown
[](https://github.com/Iconica-Development) [](https://github.com/Iconica-Development/flutter_registration/actions/new) [](https://github.com/tenhobi/effective_dart)
|
|
|
|
# Flutter Registration
|
|
|
|
Flutter Registration is a package to easily implement
|
|
a registration flow in your app.
|
|
|
|

|
|
|
|
## Setup
|
|
|
|
To use this package, add `flutter_registration` as a dependency in your pubspec.yaml file.
|
|
|
|
## How to use
|
|
|
|
To configure the registration plug-in use the ```RegistrationScreen``` widget.
|
|
|
|
```dart
|
|
void main() {
|
|
runApp(
|
|
MaterialApp(
|
|
home: RegistrationScreen(
|
|
registrationOptions: RegistrationOptions(
|
|
registrationRepository: ExampleRegistrationRepository(),
|
|
registrationSteps: RegistrationOptions.defaultSteps,
|
|
afterRegistration: () {
|
|
debugPrint('Registered!');
|
|
},
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
```
|
|
|
|
You are required to provide your own RegistrationRepository, this can be done using the parameter ```registrationRepository``` within the RegistrationsOptions which can be assigned to the RegistrationScreen widget.
|
|
|
|
A RegistrationRepository is responsible for sending the provided user details (email address and password for example) to an API.
|
|
|
|
An example for creating a RegistrationRepository is specificied below:
|
|
```dart
|
|
class ExampleRegistrationRepository with RegistrationRepository {
|
|
@override
|
|
Future<bool> register(HashMap values) {
|
|
debugPrint('register: $values');
|
|
return Future.value(true);
|
|
}
|
|
}
|
|
```
|
|
|
|
See the [Example Code](example/lib/main.dart) for an example on how to use this package.
|
|
|
|
## Issues
|
|
|
|
Please file any issues, bugs or feature request as an issue on our [GitHub](https://github.com/Iconica-Development/flutter_registration) page. Commercial support is available if you need help with integration with your app or services. You can contact us at [support@iconica.nl](mailto:support@iconica.nl).
|
|
|
|
## Want to contribute
|
|
|
|
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our [contribution guide](./CONTRIBUTING.md) and send us your [pull request](https://github.com/Iconica-Development/flutter_registration/pulls).
|
|
|
|
## Author
|
|
|
|
This `flutter_registration` for Flutter is developed by [Iconica](https://iconica.nl). You can contact us at <support@iconica.nl> |