2022-11-01 09:19:20 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Iconica
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2022-09-20 15:51:22 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_registration/flutter_registration.dart';
|
|
|
|
import 'example_registration_repository.dart';
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
runApp(
|
|
|
|
const MaterialApp(
|
|
|
|
home: FlutterRegistrationDemo(),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
class FlutterRegistrationDemo extends StatelessWidget {
|
|
|
|
const FlutterRegistrationDemo({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return RegistrationScreen(
|
2022-09-26 10:35:53 +02:00
|
|
|
registrationOptions: RegistrationOptions(
|
|
|
|
registrationRepository: ExampleRegistrationRepository(),
|
|
|
|
registrationSteps: RegistrationOptions.defaultSteps,
|
|
|
|
afterRegistration: () {
|
|
|
|
debugPrint('Registered!');
|
|
|
|
},
|
|
|
|
),
|
2022-09-20 15:51:22 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class ProtectedScreen extends StatelessWidget {
|
|
|
|
const ProtectedScreen({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return const Scaffold(
|
|
|
|
body: Center(
|
|
|
|
child: Text('FlutterRegistrationDemo'),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|