add drawer mode to paramenter

This commit is contained in:
2024-10-30 12:53:17 +02:00
parent 05d807fea4
commit aba178f2e5
3 changed files with 11 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ class MIHProfilePicture extends StatefulWidget {
PlatformFile? proPic;
final double width;
final double radius;
final bool drawerMode;
final bool editable;
final onChange;
MIHProfilePicture({
@@ -19,6 +20,7 @@ class MIHProfilePicture extends StatefulWidget {
required this.proPic,
required this.width,
required this.radius,
required this.drawerMode,
required this.editable,
required this.onChange,
});
@@ -32,8 +34,13 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
//late PlatformFile proPic;
Widget displayEditableProPic() {
ImageProvider logoFrame =
MzanziInnovationHub.of(context)!.theme.altLogoFrame();
ImageProvider logoFrame;
if (!widget.drawerMode) {
logoFrame = MzanziInnovationHub.of(context)!.theme.altLogoFrame();
} else {
logoFrame = MzanziInnovationHub.of(context)!.theme.logoFrame();
}
if (widget.profilePictureFile != null) {
return Stack(
alignment: Alignment.center,

View File

@@ -568,6 +568,7 @@ class _MIHHomeState extends State<MIHHome> {
proPic: null,
width: 45,
radius: 21,
drawerMode: false,
editable: false,
onChange: (newProPic) {},
),

View File

@@ -274,6 +274,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
proPic: proPic,
width: 155,
radius: 70,
drawerMode: false,
editable: true,
onChange: (newProPic) {
setState(() {