Firebase AsyncSnapshot, length of documents? - flutter

I need the length of Firebase documents for my app to make a ListView of them, but for some reason the data.docs cannot be found, even though the official Firebase website says it should (https://firebase.flutter.dev/docs/firestore-odm/references/). I tried everything, using documents keyword instead, using snapshot.requireData, but nothing is working. What am I doing wrong here?

enter image description here
use this way

Related

how to retrieve data from firebase to flutter?

I want to get data from firebase to my flutter app. I created a collection at firebase but don't know how to use it on flutter. Already I've done the setup process between flutter and firebase and also added necessary dependencies. but now I need help to get data from firebase. collection name '0xethocity' ;
Here's the documentation, try to implement it by yourself. Let us know if you get stuck.
https://firebase.google.com/docs/flutter/setup?platform=ios

Firestore how to set serverTimestamp behaviour in Flutter?

I am trying to make my app save local changes (e.g. saving notes) to firestore db while it is offline. When I use DateTime.now() for timeCreated, everything (most of job) works, but obviously, it is not correct time. I found solution with using FieldValue.serverTimestamp() to have correct time, but once I try to use it while app is offline, I can't get a value of previous timeCreated fields. Furthermore, I found out about DocumentSnapshot.ServerTimestampBehavior in firebase docs, and now I don't have clue how to use it or is it even available in flutter mobile apps. Link for Android: Android docs.
EDIT
I already gave up from using serverTimestamp, but I gave it another shot and successfully solved it. The problem was that I used hasPendingWriteson whole query, instead on single document which is added (updated) offline. In this article everything is described link. Still, I didn't find solution for my question.

Suggestions to save local persistently data on Flutter

I'm a beginner in Flutter and sometimes I'm not sure about the proper approach to get things done. In this case I would like to save a list of favorites and history views based on an api request. The idea is that when the user reloads the app the data is still on the mobile(let's say they can see their saved bookmarks). I'm not planning to use a database as firebase as I do not need nothing complicated. Which would be the best way/approach to accomplish it? I've been reading sqflite package but not sure if it is the way to go. Please could you give me some thoughts or ideas?
I think shared-preference would perfectly match your need.
https://pub.dev/packages/shared_preferences
Here you have one article, which describes how to use it: https://medium.com/flutter-community/shared-preferences-how-to-save-flutter-application-settings-and-user-preferences-for-later-554d08671ae9
Yep as #jaop said , Shared Preferences is the best choice , but still if u want most probability of getting the data then u can use , Along with Shared Preferences , Provider or passing data from one page to another . This decreases the chance of not getting data from Shared Preferences , which happens very rarely but still.

Setting up Dynamic Links in Firebase with Wordpress site

I am really struggling here... All I actually want to achieve is that I can get the Generate-Strong-Password function inside my app but that is actually harder than I thought.
I learned that I should go with Firebase Dynamic Links because I have a Wordpress-Website from All-Inkl.com.
I followed this Tutorial and there is actually an Apple-Site-Association-File at the moment. But I can't access my Website anymore as it looks like this:
Inside my Firebase Project I am getting this error which says that there not all the necessary "A-Files" are inside my Website:
My DNS-Settings:
I've been struggling for weeks now to get this done so if anyone has any idea how I can fix it I would be extremely grateful!! (btw, I am a total newbie when it comes to websites; I know my way around Swift though)
It seems that different domain providers accept different values for DNS entries ('A records' = 'A-Datensätze', in this case).
Try editing the entries for the Host field (which currently hold your website's URL) to one of the 'common inputs' listed here: https://firebase.google.com/docs/hosting/custom-domain?hl=de#domain-key
As the URL to your site doesn't seem to be what your provider accepts, I would suggest you try replacing it with the next option, i.e. replacing it with # .
Hope this helps solving your issue!

Invalid or missing URL scheme hackbook

I am trying to use facebook ios sdk but when I run the Hackbook example it gives me the error message "Invalid or missing URL scheme. You cannot run the app unti you set up a valid URL scheme in your .plist" Where do I make the changes for this?
Since one of the answers mentioned it, I will say that I have already modified the plist to have fb[my_app_id] in the URLSchemes.
This tutorial walks you through the process step by step, search for "Modify the app property list file".
I figured it out. There was another instance in the code where the ID needed to be replaced. What's odd is that it's not specifically called out as far as I can tell. I did a search for it.
you have to add like this
100% works and solved crash