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,22 +32,32 @@ 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(
|
||||||
alignment: Alignment.center,
|
onTap: () {
|
||||||
fit: StackFit.loose,
|
Navigator.of(context).pop();
|
||||||
children: [
|
Navigator.of(context).pushNamed(
|
||||||
CircleAvatar(
|
'/user-profile',
|
||||||
backgroundColor:
|
arguments: AppProfileUpdateArguments(
|
||||||
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
widget.signedInUser, widget.propicFile),
|
||||||
backgroundImage: widget.propicFile,
|
);
|
||||||
//'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'),
|
},
|
||||||
radius: 27,
|
child: Stack(
|
||||||
),
|
alignment: Alignment.center,
|
||||||
SizedBox(
|
fit: StackFit.loose,
|
||||||
width: 60,
|
children: [
|
||||||
child: Image(image: logoFrame),
|
CircleAvatar(
|
||||||
)
|
backgroundColor:
|
||||||
],
|
MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||||
|
backgroundImage: widget.propicFile,
|
||||||
|
//'https://media.licdn.com/dms/image/D4D03AQGd1-QhjtWWpA/profile-displayphoto-shrink_400_400/0/1671698053061?e=2147483647&v=beta&t=a3dJI5yxs5-KeXjj10LcNCFuC9IOfa8nNn3k_Qyr0CA'),
|
||||||
|
radius: 27,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 60,
|
||||||
|
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