change profile picture to use icons
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:file_picker/file_picker.dart';
|
import 'package:file_picker/file_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
|
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
@@ -33,16 +34,8 @@ class MIHProfilePicture extends StatefulWidget {
|
|||||||
|
|
||||||
class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
||||||
late ImageProvider<Object>? propicPreview;
|
late ImageProvider<Object>? propicPreview;
|
||||||
//late PlatformFile proPic;
|
|
||||||
|
|
||||||
Widget displayEditableProPic() {
|
Widget displayEditableProPic() {
|
||||||
ImageProvider logoFrame;
|
|
||||||
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,
|
||||||
@@ -57,7 +50,10 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
|||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: widget.width,
|
width: widget.width,
|
||||||
child: Image(image: logoFrame),
|
child: Icon(
|
||||||
|
MihIcons.mihCircleFrame,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: widget.editable,
|
visible: widget.editable,
|
||||||
@@ -134,7 +130,10 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
|||||||
} else {
|
} else {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: widget.width,
|
width: widget.width,
|
||||||
child: Image(image: logoFrame),
|
child: Icon(
|
||||||
|
MihIcons.mihCircleFrame,
|
||||||
|
color: MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user