forked from yaso_meth/mih-project
add drawer mode to paramenter
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -568,6 +568,7 @@ class _MIHHomeState extends State<MIHHome> {
|
||||
proPic: null,
|
||||
width: 45,
|
||||
radius: 21,
|
||||
drawerMode: false,
|
||||
editable: false,
|
||||
onChange: (newProPic) {},
|
||||
),
|
||||
|
||||
@@ -274,6 +274,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||
proPic: proPic,
|
||||
width: 155,
|
||||
radius: 70,
|
||||
drawerMode: false,
|
||||
editable: true,
|
||||
onChange: (newProPic) {
|
||||
setState(() {
|
||||
|
||||
Reference in New Issue
Block a user