git ignore update and edit profile update
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -13,3 +13,4 @@ Mzansi_Mail/
|
|||||||
.venv
|
.venv
|
||||||
google-chrome-stable_current_amd64.deb
|
google-chrome-stable_current_amd64.deb
|
||||||
.env
|
.env
|
||||||
|
Frontend/android/app/.cxx
|
||||||
@@ -66,13 +66,14 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
|||||||
right: 0,
|
right: 0,
|
||||||
child: IconButton.filled(
|
child: IconButton.filled(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
FilePickerResult? result =
|
try {
|
||||||
await FilePicker.platform.pickFiles(
|
|
||||||
type: FileType.custom,
|
|
||||||
allowedExtensions: ['jpg', 'png'],
|
|
||||||
);
|
|
||||||
// print(
|
// print(
|
||||||
// "Platform: ${MzanziInnovationHub.of(context)!.theme.getPlatform()}");
|
// "Platform: ${MzanziInnovationHub.of(context)!.theme.getPlatform()}");
|
||||||
|
FilePickerResult? result =
|
||||||
|
await FilePicker.platform.pickFiles(
|
||||||
|
type: FileType.image,
|
||||||
|
);
|
||||||
|
|
||||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||||
"Web") {
|
"Web") {
|
||||||
if (result == null) return;
|
if (result == null) return;
|
||||||
@@ -89,7 +90,7 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// print(
|
// print(
|
||||||
// "================\nHere for Android\n========================");
|
// "================\nHere for Android & IOS\n========================");
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
// print("here 1");
|
// print("here 1");
|
||||||
File file = File(result.files.single.path!);
|
File file = File(result.files.single.path!);
|
||||||
@@ -116,9 +117,13 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
|
|||||||
widget.proPicController.text = widget.proPic!.name;
|
widget.proPicController.text = widget.proPic!.name;
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
print("here in else");
|
||||||
// User canceled the picker
|
// User canceled the picker
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print("Error: $e");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.edit),
|
icon: const Icon(Icons.edit),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user