Add guesture ditector to profile picture and make profile type uppercase
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:patient_manager/main.dart';
|
import 'package:patient_manager/main.dart';
|
||||||
import 'package:patient_manager/objects/appUser.dart';
|
import 'package:patient_manager/objects/appUser.dart';
|
||||||
|
import 'package:patient_manager/objects/arguments.dart';
|
||||||
import 'package:supertokens_flutter/supertokens.dart';
|
import 'package:supertokens_flutter/supertokens.dart';
|
||||||
|
|
||||||
class MIHAppDrawer extends StatefulWidget {
|
class MIHAppDrawer extends StatefulWidget {
|
||||||
@@ -31,7 +32,16 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
ImageProvider logoFrame =
|
ImageProvider logoFrame =
|
||||||
MzanziInnovationHub.of(context)!.theme.logoFrame();
|
MzanziInnovationHub.of(context)!.theme.logoFrame();
|
||||||
if (widget.propicFile != null) {
|
if (widget.propicFile != null) {
|
||||||
return Stack(
|
return GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
Navigator.of(context).pushNamed(
|
||||||
|
'/user-profile',
|
||||||
|
arguments: AppProfileUpdateArguments(
|
||||||
|
widget.signedInUser, widget.propicFile),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
fit: StackFit.loose,
|
fit: StackFit.loose,
|
||||||
children: [
|
children: [
|
||||||
@@ -47,6 +57,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
child: Image(image: logoFrame),
|
child: Image(image: logoFrame),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
@@ -112,7 +123,7 @@ class _MIHAppDrawerState extends State<MIHAppDrawer> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.signedInUser.type,
|
widget.signedInUser.type.toUpperCase(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
|
|||||||
Reference in New Issue
Block a user