草庐IT

firebase-notifications

全部标签

firebase - 全局访问 Google 登录用户名

我在flutter中遇到了FirebaseAuth的问题,更具体地说是user.displayName查询。我在我的应用程序的第一个屏幕上使用强制性Google登录,因此我可以保证在所有后续屏幕上用户都有一个名称和一个与其关联的userId。然而,每次我想访问用户名时,我现在所做的就是再次对用户进行身份验证:GoogleSignInAccountgoogleUser=awaitgoogleSignIn.signInSilently();GoogleSignInAuthenticationgoogleAuth=awaitgoogleUser.authentication;Firebase

firebase - 全局访问 Google 登录用户名

我在flutter中遇到了FirebaseAuth的问题,更具体地说是user.displayName查询。我在我的应用程序的第一个屏幕上使用强制性Google登录,因此我可以保证在所有后续屏幕上用户都有一个名称和一个与其关联的userId。然而,每次我想访问用户名时,我现在所做的就是再次对用户进行身份验证:GoogleSignInAccountgoogleUser=awaitgoogleSignIn.signInSilently();GoogleSignInAuthenticationgoogleAuth=awaitgoogleUser.authentication;Firebase

android - 在 Flutter 中,如何使用 CachedNetworkImage 显示来自 Firebase 的离线图像?

我正在尝试让我的Flutter应用与Firebase一起离线工作。我将对图像的引用存储在Firestore上,将图像文件存储在Storage上。我让Firestore部分正常工作,并且我正在使用CachedNetworkImageProvider来显示我的图像,这些图像会缓存以供离线使用。但是当我处于离线状态时,即使缓存了图片,我也无法获取图片的URL,因此无法将其传递给使用URL作为键的CachedNetworkImageProvider。因此在离线时我知道图像路径,并且我已将文件存储在设备上,我只需要一种获取URL的方法。我是否需要手动将存储中的下载URL存储在设备上,以便离线使用

android - 在 Flutter 中,如何使用 CachedNetworkImage 显示来自 Firebase 的离线图像?

我正在尝试让我的Flutter应用与Firebase一起离线工作。我将对图像的引用存储在Firestore上,将图像文件存储在Storage上。我让Firestore部分正常工作,并且我正在使用CachedNetworkImageProvider来显示我的图像,这些图像会缓存以供离线使用。但是当我处于离线状态时,即使缓存了图片,我也无法获取图片的URL,因此无法将其传递给使用URL作为键的CachedNetworkImageProvider。因此在离线时我知道图像路径,并且我已将文件存储在设备上,我只需要一种获取URL的方法。我是否需要手动将存储中的下载URL存储在设备上,以便离线使用

firebase-realtime-database - Flutter:Firebase 基本查询或基本搜索代码

主要概念是显示包含搜索字母表的文档或字段。搜索栏得到给定的输入,它发送给_firebasesearch(),但没有返回任何结果,上图是我的数据库结构,想了一个多星期.代码import'dart:async';import'package:flutter/material.dart';import'package:cloud_firestore/cloud_firestore.dart';import'package:flutter_search_bar/flutter_search_bar.dart';SearchBarsearchBar;GlobalKey_scaffoldKey=n

firebase-realtime-database - Flutter:Firebase 基本查询或基本搜索代码

主要概念是显示包含搜索字母表的文档或字段。搜索栏得到给定的输入,它发送给_firebasesearch(),但没有返回任何结果,上图是我的数据库结构,想了一个多星期.代码import'dart:async';import'package:flutter/material.dart';import'package:cloud_firestore/cloud_firestore.dart';import'package:flutter_search_bar/flutter_search_bar.dart';SearchBarsearchBar;GlobalKey_scaffoldKey=n

firebase - flutter firebase 用户在应用程序启动时登录

在初始屏幕中,我想检查是否有经过身份验证的用户导航到主页如果不去注册/登录页面这是我的启动画面代码,该方法启动并检查是否有用户登录,如果有用户登录则导航到主页class_SplashScreenStateextendsState{finalFirebaseAuth_auth=FirebaseAuth.instance;FirebaseUser_user;Future_getUser()async{_user=await_auth.currentUser();return_user;}FuturestartTime()async{var_duration=newDuration(seco

firebase - flutter firebase 用户在应用程序启动时登录

在初始屏幕中,我想检查是否有经过身份验证的用户导航到主页如果不去注册/登录页面这是我的启动画面代码,该方法启动并检查是否有用户登录,如果有用户登录则导航到主页class_SplashScreenStateextendsState{finalFirebaseAuth_auth=FirebaseAuth.instance;FirebaseUser_user;Future_getUser()async{_user=await_auth.currentUser();return_user;}FuturestartTime()async{var_duration=newDuration(seco

Firebase 存储图像无法正确上传

我正在尝试将我从手机拍摄的图像发送到Firebase存储。第一个函数使用图像选择器插件获取图像,并将路径返回作为上传函数的参数传递。图像上传到云存储,但在面板中类型为application/octet-stream并且图像不显示Stringdownload_path;varimageFile;picker()async{FiletheImage=awaitImagePicker.pickImage(source:ImageSource.gallery);imageFile=theImage;vartheimagepath=theImage.path;setState((){imageF

Firebase 存储图像无法正确上传

我正在尝试将我从手机拍摄的图像发送到Firebase存储。第一个函数使用图像选择器插件获取图像,并将路径返回作为上传函数的参数传递。图像上传到云存储,但在面板中类型为application/octet-stream并且图像不显示Stringdownload_path;varimageFile;picker()async{FiletheImage=awaitImagePicker.pickImage(source:ImageSource.gallery);imageFile=theImage;vartheimagepath=theImage.path;setState((){imageF