我正在使用一个需要上传大文件的应用程序。我不想在应用程序中显示进度,我想在通知托盘中显示它,完成后在通知托盘中显示成功,同时上传到Firebase Firestore...
上传的功能..
Future<bool> imageBannerPick(BuildContext context, ImageSource source) async {
final pickedFile = await picker.pickImage(source: source);
if (pickedFile == null) {
return false;
}
File image = File(pickedFile.path);
String uploadString = await uploadingFile(uploadFile: image);
//storing the string to your profile
await firestore.collection('users').doc(auth.currentUser?.uid).update({
'backBannerPicture': uploadString,
});
return true;
}
1条答案
按热度按时间ztyzrc3y1#