update authentication with supertokens

This commit is contained in:
2024-07-23 15:29:51 +02:00
parent 69fe58ffaf
commit 02aede01d0
18 changed files with 379 additions and 260 deletions

View File

@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';
import 'package:google_nav_bar/google_nav_bar.dart';
import 'package:patient_manager/components/myAppBar.dart';
import 'package:patient_manager/components/profileOfficeUpdate.dart';
import 'package:patient_manager/components/profileUserUpdate.dart';
import 'package:patient_manager/main.dart';
import 'package:patient_manager/objects/appUser.dart';
class ProfileUpdate extends StatefulWidget {
@@ -20,7 +18,7 @@ class ProfileUpdate extends StatefulWidget {
}
class _ProfileUpdateState extends State<ProfileUpdate> {
int _selectedIndex = 0;
//int _selectedIndex = 0;
late List<Widget> _widgetOptions;
@override
@@ -42,34 +40,34 @@ class _ProfileUpdateState extends State<ProfileUpdate> {
return Scaffold(
appBar: const MyAppBar(barTitle: "Update Profile"),
body: Center(
child: _widgetOptions.elementAt(_selectedIndex),
),
bottomNavigationBar: GNav(
//hoverColor: Colors.lightBlueAccent,
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
iconSize: 35.0,
activeColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
tabBackgroundColor:
MzanziInnovationHub.of(context)!.theme.secondaryColor(),
//gap: 20,
//padding: EdgeInsets.all(15),
tabs: const [
GButton(
icon: Icons.perm_identity,
text: "User Profile",
),
GButton(
icon: Icons.business,
text: "Office Profile",
),
],
selectedIndex: _selectedIndex,
onTabChange: (index) {
setState(() {
_selectedIndex = index;
});
},
child: _widgetOptions.elementAt(0),
),
// bottomNavigationBar: GNav(
// //hoverColor: Colors.lightBlueAccent,
// color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
// iconSize: 35.0,
// activeColor: MzanziInnovationHub.of(context)!.theme.primaryColor(),
// tabBackgroundColor:
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
// //gap: 20,
// //padding: EdgeInsets.all(15),
// tabs: const [
// GButton(
// icon: Icons.perm_identity,
// text: "User Profile",
// ),
// GButton(
// icon: Icons.business,
// text: "Office Profile",
// ),
// ],
// selectedIndex: _selectedIndex,
// onTabChange: (index) {
// setState(() {
// _selectedIndex = index;
// });
// },
// ),
);
}
}