草庐IT

firebase-notifications

全部标签

notifications - Flutter:如何仅当我们使用 local_notification 单击通知时才执行操作?

我正在使用local_notification显示通知,我想在单击通知时执行一个操作(例如,在新窗口中打开新信号的消息)。我试着用onNotificationClick:newNotificationAction(actionText:"Open",callback:openSignal(signalEventFromCloud[i]),payload:"Opensignal")回调函数为:openSignal(Signalsignal){Navigator.push(context,newMaterialPageRoute(builder:(context)=>newDetailSc

notifications - Flutter:如何仅当我们使用 local_notification 单击通知时才执行操作?

我正在使用local_notification显示通知,我想在单击通知时执行一个操作(例如,在新窗口中打开新信号的消息)。我试着用onNotificationClick:newNotificationAction(actionText:"Open",callback:openSignal(signalEventFromCloud[i]),payload:"Opensignal")回调函数为:openSignal(Signalsignal){Navigator.push(context,newMaterialPageRoute(builder:(context)=>newDetailSc

firebase-realtime-database - Flutter firebase 数据库迭代项目

我想知道如何从Flutter上的路径获取对象列表,这是我获取一个对象并正常工作的方法:staticFuturegetYear(StringyearKey)async{Completercompleter=newCompleter();FirebaseDatabase.instance.reference().child("year").child(yearKey).once().then((DataSnapshotsnapshot){varyear=newYear.fromJson(snapshot.key,snapshot.value);completer.complete(year

firebase-realtime-database - Flutter firebase 数据库迭代项目

我想知道如何从Flutter上的路径获取对象列表,这是我获取一个对象并正常工作的方法:staticFuturegetYear(StringyearKey)async{Completercompleter=newCompleter();FirebaseDatabase.instance.reference().child("year").child(yearKey).once().then((DataSnapshotsnapshot){varyear=newYear.fromJson(snapshot.key,snapshot.value);completer.complete(year

firebase - Flutter 从 Firebase 返回文档的长度

我试图用这个函数返回文档列表的长度:FuturetotalLikes(postID)async{varrespectsQuery=Firestore.instance.collection('respects').where('postID',isEqualTo:postID);respectsQuery.getDocuments().then((data){vartotalEquals=data.documents.length;returntotalEquals;});}我将其初始化为voidinit状态(使用另一个函数调用:voidinitState(){totalLikes(p

firebase - Flutter 从 Firebase 返回文档的长度

我试图用这个函数返回文档列表的长度:FuturetotalLikes(postID)async{varrespectsQuery=Firestore.instance.collection('respects').where('postID',isEqualTo:postID);respectsQuery.getDocuments().then((data){vartotalEquals=data.documents.length;returntotalEquals;});}我将其初始化为voidinit状态(使用另一个函数调用:voidinitState(){totalLikes(p

dart - Flutter 从 Firebase 存储中获取下载地址

我正在尝试从Firebase存储加载缩略图,以提高我的应用程序的性能。加载缩略图后,应显示实际图像。出于这个原因,我实现了一个云功能,它会自动为每张图片上传缩略图。我从上传的图片中获取下载url没有问题。但是由于缩略图的生成需要3秒的原因,我无法从缩略图自动检索下载Url。这是我到目前为止的想法:FutureuploadImage(varimageFile)async{varuuid=newUuid().v1();StorageReferenceref=FirebaseStorage.instance.ref().child("post_$uuid.jpg");StorageUploa

dart - Flutter 从 Firebase 存储中获取下载地址

我正在尝试从Firebase存储加载缩略图,以提高我的应用程序的性能。加载缩略图后,应显示实际图像。出于这个原因,我实现了一个云功能,它会自动为每张图片上传缩略图。我从上传的图片中获取下载url没有问题。但是由于缩略图的生成需要3秒的原因,我无法从缩略图自动检索下载Url。这是我到目前为止的想法:FutureuploadImage(varimageFile)async{varuuid=newUuid().v1();StorageReferenceref=FirebaseStorage.instance.ref().child("post_$uuid.jpg");StorageUploa

firebase - Flutter Firebase (firebase_core) 不在 Android 上构建

当使用Firebase插件并开始构建Android时,出现以下错误:ERROR:Failedtoresolve:com.google.firebase:firebase-core:AffectedModules:app,firebase_core.它在iOS上运行良好。FAILURE:Buildfailedwithanexception.*Whatwentwrong:Couldnotdeterminethedependenciesoftask':app:compileDebugJavaWithJavac'.>Couldnotresolvealltaskdependenciesforco

firebase - Flutter Firebase (firebase_core) 不在 Android 上构建

当使用Firebase插件并开始构建Android时,出现以下错误:ERROR:Failedtoresolve:com.google.firebase:firebase-core:AffectedModules:app,firebase_core.它在iOS上运行良好。FAILURE:Buildfailedwithanexception.*Whatwentwrong:Couldnotdeterminethedependenciesoftask':app:compileDebugJavaWithJavac'.>Couldnotresolvealltaskdependenciesforco