Navigate to AuthGate upon registration completion.
parent
79c5b562cb
commit
86bacaa9f5
|
@ -5,6 +5,7 @@ import '../constants.dart';
|
|||
import '../enumerations.dart';
|
||||
import '../pages/registration_complete_page.dart';
|
||||
import '../services/auth/auth_service.dart';
|
||||
import '../utils/helper_dialogs.dart';
|
||||
|
||||
class RisksFormPage extends StatefulWidget {
|
||||
const RisksFormPage(
|
||||
|
@ -77,22 +78,17 @@ class RisksFormPageState extends State<RisksFormPage> {
|
|||
}
|
||||
|
||||
void _showSnackBar(String message) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(message)),
|
||||
);
|
||||
showErrorSnackBar(context, message);
|
||||
}
|
||||
|
||||
Future<void> handleSubmit() async {
|
||||
if (communicationPreference == null) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text('Please select a communication preference.'),
|
||||
));
|
||||
showErrorSnackBar(context, 'Please select a communication preference.');
|
||||
return;
|
||||
}
|
||||
if (riskPreference == null) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
|
||||
content: Text('Please select the willingness to take risks.'),
|
||||
));
|
||||
showErrorSnackBar(
|
||||
context, 'Please select the willingness to take risks.');
|
||||
return;
|
||||
}
|
||||
// Handle the form submission logic here
|
||||
|
|
|
@ -28,7 +28,6 @@ void main() async {
|
|||
class MyApp extends StatelessWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
// This widget is the root of your application.
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'home_page.dart';
|
||||
import '../services/auth/auth_gate.dart';
|
||||
|
||||
class RegistrationCompletePage extends StatelessWidget {
|
||||
const RegistrationCompletePage({super.key});
|
||||
|
@ -45,7 +45,7 @@ class RegistrationCompletePage extends StatelessWidget {
|
|||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const HomePage()),
|
||||
MaterialPageRoute(builder: (context) => const AuthGate()),
|
||||
);
|
||||
},
|
||||
child: const Text('S T A R T'),
|
||||
|
|
Loading…
Reference in New Issue