git ignore update and edit profile update

This commit is contained in:
2025-02-20 14:01:23 +02:00
parent dd5c2e598e
commit 4e11cbcce5
2 changed files with 50 additions and 44 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ Mzansi_Mail/
.venv
google-chrome-stable_current_amd64.deb
.env
Frontend/android/app/.cxx

View File

@@ -66,13 +66,14 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
right: 0,
child: IconButton.filled(
onPressed: () async {
FilePickerResult? result =
await FilePicker.platform.pickFiles(
type: FileType.custom,
allowedExtensions: ['jpg', 'png'],
);
try {
// print(
// "Platform: ${MzanziInnovationHub.of(context)!.theme.getPlatform()}");
FilePickerResult? result =
await FilePicker.platform.pickFiles(
type: FileType.image,
);
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
"Web") {
if (result == null) return;
@@ -89,7 +90,7 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
});
} else {
// print(
// "================\nHere for Android\n========================");
// "================\nHere for Android & IOS\n========================");
if (result != null) {
// print("here 1");
File file = File(result.files.single.path!);
@@ -116,9 +117,13 @@ class _MIHProfilePictureState extends State<MIHProfilePicture> {
widget.proPicController.text = widget.proPic!.name;
});
} else {
print("here in else");
// User canceled the picker
}
}
} catch (e) {
print("Error: $e");
}
},
icon: const Icon(Icons.edit),
),