Merge pull request #34 from yaso-meth/Bug-Post-Set-Up-Profile-Navigation-fix
Bug-Post-Set-Up-Profile-Navigation-fix
This commit is contained in:
@@ -141,12 +141,12 @@ class MIHApiCalls {
|
|||||||
// var errorBody = response.body;
|
// var errorBody = response.body;
|
||||||
|
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
print("Here1");
|
// print("Here1");
|
||||||
var decodedData = jsonDecode(response.body);
|
var decodedData = jsonDecode(response.body);
|
||||||
print("Here2");
|
// print("Here2");
|
||||||
Patient patients = Patient.fromJson(decodedData as Map<String, dynamic>);
|
Patient patients = Patient.fromJson(decodedData as Map<String, dynamic>);
|
||||||
print("Here3");
|
// print("Here3");
|
||||||
print(patients);
|
// print(patients);
|
||||||
patientData = patients;
|
patientData = patients;
|
||||||
} else {
|
} else {
|
||||||
patientData = null;
|
patientData = null;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MIHButton extends StatefulWidget {
|
class MIHButton extends StatefulWidget {
|
||||||
final void Function() onTap;
|
final void Function()? onTap;
|
||||||
final String buttonText;
|
final String buttonText;
|
||||||
final Color buttonColor;
|
final Color buttonColor;
|
||||||
final Color textColor;
|
final Color textColor;
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
onTap: () async {
|
onTap: () async {
|
||||||
await SuperTokens.signOut(
|
await SuperTokens.signOut(
|
||||||
completionHandler: (error) {
|
completionHandler: (error) {
|
||||||
//print(error);
|
print(error);
|
||||||
});
|
});
|
||||||
if (await SuperTokens.doesSessionExist() ==
|
if (await SuperTokens.doesSessionExist() ==
|
||||||
false) {
|
false) {
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ class _RegisterState extends State<Register> {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
//Heading
|
//Heading
|
||||||
Text(
|
Text(
|
||||||
'Register',
|
'Create a New Account',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@@ -349,10 +349,10 @@ class _RegisterState extends State<Register> {
|
|||||||
width: 500.0,
|
width: 500.0,
|
||||||
height: 50.0,
|
height: 50.0,
|
||||||
child: MIHButton(
|
child: MIHButton(
|
||||||
buttonText: "Sign Up",
|
buttonText: "Create New Account",
|
||||||
buttonColor: MzanziInnovationHub.of(context)!
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.secondaryColor(),
|
.successColor(),
|
||||||
textColor: MzanziInnovationHub.of(context)!
|
textColor: MzanziInnovationHub.of(context)!
|
||||||
.theme
|
.theme
|
||||||
.primaryColor(),
|
.primaryColor(),
|
||||||
@@ -362,6 +362,21 @@ class _RegisterState extends State<Register> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
// SizedBox(
|
||||||
|
// width: 500.0,
|
||||||
|
// height: 50.0,
|
||||||
|
// child: MIHButton(
|
||||||
|
// buttonText: "Sign In",
|
||||||
|
// buttonColor: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// textColor: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .primaryColor(),
|
||||||
|
// onTap: widget.onTap,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(height: 10),
|
||||||
//register text
|
//register text
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 500.0,
|
width: 500.0,
|
||||||
|
|||||||
@@ -457,41 +457,57 @@ class _SignInState extends State<SignIn> {
|
|||||||
),
|
),
|
||||||
//spacer
|
//spacer
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
//register text
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 500.0,
|
width: 500.0,
|
||||||
//height: 100.0,
|
height: 50.0,
|
||||||
child: Row(
|
child: MIHButton(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
buttonText: "Create New Account",
|
||||||
children: [
|
buttonColor: MzanziInnovationHub.of(context)!
|
||||||
Text(
|
.theme
|
||||||
'New User?',
|
.successColor(),
|
||||||
style: TextStyle(
|
textColor: MzanziInnovationHub.of(context)!
|
||||||
fontSize: 18,
|
.theme
|
||||||
color: MzanziInnovationHub.of(context)!
|
.primaryColor(),
|
||||||
.theme
|
onTap: widget.onTap,
|
||||||
.messageTextColor()),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
width: 6,
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: widget.onTap,
|
|
||||||
child: Text(
|
|
||||||
'Register Now',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18,
|
|
||||||
color: MzanziInnovationHub.of(context)!
|
|
||||||
.theme
|
|
||||||
.secondaryColor(),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//spacer
|
//spacer
|
||||||
|
const SizedBox(height: 10),
|
||||||
|
//register text
|
||||||
|
// SizedBox(
|
||||||
|
// width: 500.0,
|
||||||
|
// //height: 100.0,
|
||||||
|
// child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
// children: [
|
||||||
|
// Text(
|
||||||
|
// 'New User?',
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18,
|
||||||
|
// color: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .messageTextColor()),
|
||||||
|
// ),
|
||||||
|
// const SizedBox(
|
||||||
|
// width: 6,
|
||||||
|
// ),
|
||||||
|
// GestureDetector(
|
||||||
|
// onTap: widget.onTap,
|
||||||
|
// child: Text(
|
||||||
|
// 'Register Now',
|
||||||
|
// style: TextStyle(
|
||||||
|
// fontSize: 18,
|
||||||
|
// color: MzanziInnovationHub.of(context)!
|
||||||
|
// .theme
|
||||||
|
// .secondaryColor(),
|
||||||
|
// fontWeight: FontWeight.bold,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//spacer
|
||||||
const SizedBox(height: 15),
|
const SizedBox(height: 15),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 500.0,
|
width: 500.0,
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class _MIHHomeState extends State<MIHHome> {
|
|||||||
p: getPrim(),
|
p: getPrim(),
|
||||||
s: getSec(),
|
s: getSec(),
|
||||||
));
|
));
|
||||||
print("Pat Prof: ${widget.patient}");
|
// print("Pat Prof: ${widget.patient}");
|
||||||
if (widget.patient != null) {
|
if (widget.patient != null) {
|
||||||
tileList.add(MIHTile(
|
tileList.add(MIHTile(
|
||||||
videoID: "NUDdoWrbXNc",
|
videoID: "NUDdoWrbXNc",
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
|||||||
//print("Here4");
|
//print("Here4");
|
||||||
//print(response.statusCode);
|
//print(response.statusCode);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.popAndPushNamed('/', arguments: widget.arguments.signedInUser);
|
.popAndPushNamed('/', arguments: widget.arguments.signedInUser);
|
||||||
String message =
|
String message =
|
||||||
|
|||||||
Reference in New Issue
Block a user