flutter_registration/README.md

63 lines
2.6 KiB
Markdown
Raw Permalink Normal View History

2022-09-28 13:56:29 +02:00
[![pub package](https://img.shields.io/pub/v/bottom_alert_dialog.svg)](https://github.com/Iconica-Development) [![Build status](https://github.com/Iconica-Development/flutter_registration)](https://github.com/Iconica-Development/flutter_registration/actions/new) [![style: effective dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)
2022-09-20 15:51:22 +02:00
# Flutter Registration
2022-09-20 15:51:22 +02:00
Flutter Registration is a package to easily implement
a registration flow in your app.
2022-09-20 15:51:22 +02:00
![Registration GIF](flutter_registration.gif)
2022-09-20 15:51:22 +02:00
## Setup
2022-09-20 15:51:22 +02:00
To use this package, add `flutter_registration` as a dependency in your pubspec.yaml file.
## How to use
2022-09-20 15:51:22 +02:00
2022-09-28 13:56:29 +02:00
To configure the registration plug-in use the ```RegistrationScreen``` widget.
2022-09-20 15:51:22 +02:00
```dart
2022-09-28 13:56:29 +02:00
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);
}
}
```
2022-09-20 15:51:22 +02:00
See the [Example Code](example/lib/main.dart) for an example on how to use this package.
2022-09-20 15:51:22 +02:00
## Issues
2022-09-28 13:56:29 +02:00
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).
2022-09-20 15:51:22 +02:00
## Want to contribute
2022-09-28 13:56:29 +02:00
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).
2022-09-20 15:51:22 +02:00
## Author
This `flutter_registration` for Flutter is developed by [Iconica](https://iconica.nl). You can contact us at <support@iconica.nl>