fix route call post eign in or reg

This commit is contained in:
2025-03-11 15:48:12 +02:00
parent 7377518113
commit 7df3690102
4 changed files with 26 additions and 10 deletions

View File

@@ -38,6 +38,7 @@ class _MihloadingcircleState extends State<Mihloadingcircle> {
void initState() {
//_controller.animateTo(26);
super.initState();
checkScreenSize();
}
@override
@@ -48,7 +49,6 @@ class _MihloadingcircleState extends State<Mihloadingcircle> {
@override
Widget build(BuildContext context) {
checkScreenSize();
return Dialog(
child: Container(
padding: EdgeInsets.all(popUpPaddingSize),

View File

@@ -15,13 +15,13 @@ abstract class AppEnviroment {
case Enviroment.dev:
{
//================= Android Dev Urls =================
// baseApiUrl = "http://10.0.2.2:8080";
// baseFileUrl = "http://10.0.2.2:9000";
// baseAiUrl = "http://10.0.2.2:11434";
baseApiUrl = "http://10.0.2.2:8080";
baseFileUrl = "http://10.0.2.2:9000";
baseAiUrl = "http://10.0.2.2:11434";
//================= Web Dev Urls =================
baseApiUrl = "http://localhost:8080";
baseFileUrl = "http://localhost:9000";
baseAiUrl = "http://localhost:11434";
// baseApiUrl = "http://localhost:8080";
// baseFileUrl = "http://localhost:9000";
// baseAiUrl = "http://localhost:11434";
whatsappAccessToken =
"EAAPINXuNFdYBOzBjTcvZA2iPXEHbHRF9uNXyP3ihkPRUcBqKNru5g9NKRRKkFaiaITEzO3BMo6CjdUmlDH4qYTW2mzDrZB4Q21ZCEZBgECZCu27vfaOXJZCYQLNxwoXkrZBRYv8ZAP37f69r3z9JxLQxdxn9gwqA3oNZAlBBRapJQzxOr6pZBTdI3bbjbu17ZBIwRcF4JCqPDCNLEZCI3bmHwEd2i2niNMYZD";
//fingerPrintPluginKey = 'h5X7a5j14iUZCobI1ZeX';

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../main.dart';
@@ -53,8 +54,15 @@ class _RegisterState extends State<Register> {
}),
);
if (response.statusCode == 201) {
Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
signUpSuccess();
Navigator.of(context).pushNamedAndRemoveUntil(
'/',
(route) => false,
arguments: AuthArguments(
true,
true,
),
);
// signUpSuccess();
// setState(() {
// successfulSignUp = true;
// });

View File

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:Mzansi_Innovation_Hub/mih_objects/arguments.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import '../../main.dart';
@@ -186,7 +187,14 @@ class _SignInState extends State<SignIn> {
await signUserIn();
if (successfulSignIn) {
// TextInput.finishAutofillContext();
Navigator.of(context).pushNamedAndRemoveUntil('/', (route) => false);
Navigator.of(context).pushNamedAndRemoveUntil(
'/',
(route) => false,
arguments: AuthArguments(
true,
true,
),
);
}
}
}