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