pickAvatar method
Opens a file choose popup and updates the ChatContact.avatar
with the
selected image, if any.
Implementation
Future<void> pickAvatar() async {
FilePickerResult? result = await PlatformUtils.pickFiles(
type: FileType.image,
withReadStream: !PlatformUtils.isWeb,
withData: PlatformUtils.isWeb,
lockParentWindow: true,
);
if (result != null) {
updateAvatar(result.files.first);
}
}