add drawer mode to paramenter
This commit is contained in:
parent
05d807fea4
commit
aba178f2e5
3 changed files with 11 additions and 2 deletions
|
|
@ -10,6 +10,7 @@ class MIHProfilePicture extends StatefulWidget {
|
||||||
PlatformFile? proPic;
|
PlatformFile? proPic;
|
||||||
final double width;
|
final double width;
|
||||||
final double radius;
|
final double radius;
|
||||||
|
final bool drawerMode;
|
||||||
final bool editable;
|
final bool editable;
|
||||||
final onChange;
|
final onChange;
|
||||||
MIHProfilePicture({
|
MIHProfilePicture({
|
||||||
|
|
@ -19,6 +20,7 @@ class MIHProfilePicture extends StatefulWidget {
|
||||||
required this.proPic,
|
required this.proPic,
|
||||||
required this.width,
|
required this.width,
|
||||||
required this.radius,
|
required this.radius,
|
||||||
|
required this.drawerMode,
|
||||||
required this.editable,
|
required this.editable,
|
||||||
required this.onChange,
|
required this.onChange,
|
||||||
});
|
});
|
||||||
|
|
@ -32,8 +34,13 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
||||||
//late PlatformFile proPic;
|
//late PlatformFile proPic;
|
||||||
|
|
||||||
Widget displayEditableProPic() {
|
Widget displayEditableProPic() {
|
||||||
ImageProvider logoFrame =
|
ImageProvider logoFrame;
|
||||||
MzanziInnovationHub.of(context)!.theme.altLogoFrame();
|
if (!widget.drawerMode) {
|
||||||
|
logoFrame = MzanziInnovationHub.of(context)!.theme.altLogoFrame();
|
||||||
|
} else {
|
||||||
|
logoFrame = MzanziInnovationHub.of(context)!.theme.logoFrame();
|
||||||
|
}
|
||||||
|
|
||||||
if (widget.profilePictureFile != null) {
|
if (widget.profilePictureFile != null) {
|
||||||
return Stack(
|
return Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
|
||||||
|
|
@ -568,6 +568,7 @@ class _MIHHomeState extends State<MIHHome> {
|
||||||
proPic: null,
|
proPic: null,
|
||||||
width: 45,
|
width: 45,
|
||||||
radius: 21,
|
radius: 21,
|
||||||
|
drawerMode: false,
|
||||||
editable: false,
|
editable: false,
|
||||||
onChange: (newProPic) {},
|
onChange: (newProPic) {},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -274,6 +274,7 @@ class _ProfileUserUpdateState extends State<ProfileUserUpdate> {
|
||||||
proPic: proPic,
|
proPic: proPic,
|
||||||
width: 155,
|
width: 155,
|
||||||
radius: 70,
|
radius: 70,
|
||||||
|
drawerMode: false,
|
||||||
editable: true,
|
editable: true,
|
||||||
onChange: (newProPic) {
|
onChange: (newProPic) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue