If you get errors about Firebase app not being configured, you need to open the iOS workspace in XCode and add the GoogleService-info.plist to the runner project. I had to edit out that step in the video because of some audio issues.
you have no idea how much your videos have helped me! i accidentally deleted my files and you brought it back to existence again with these tutorials. thank you so much 😄
for anyone watching in 2021 the snapshot syntax has changed to snapshot.data[index].data()["yourFieldName"]. Note the data() function called on the document of the snapshot array
Thx for the amazing vid. The important part is the last section. U should have expand it longer or explain that first, otherwise some people like me find it boring.
Hi...Do you know why when ever I tried to run my code, the app won't lunch in simulator. It keep running runing on my vscode but never show up on my simulator. I'm not sure If it's something related to firebase that cause that problem. I'm just curious how you was able to run that. thanks
waoooo such amazing content and explanation. you save my day thinks brother. hope you will make more videos like this. waiting to watch more flutter videos from your channel
@@increadibleangel7980 You should check that your snapshot has data or not. if(snapshot.hasData){ then return this widget. } else{ return this widget. }
@Samarth Agarwal. Can you make a tutorial about how we can add search functionality to this project. If you can't, do you know is there other tutorial video that I can follow to add search function. Thank you
@Samarth Agarwal thank you for this amazing tutorial! Just in time when I needed it :) Quick question-- now that I go this to work, how can I incorporate all these calls using models? I've heard it can be more organized this way and more efficient. What'a a good place to start using models with Cloud Firesotore? 1000% grateful!
This is amazing. I have one doubt though - I am working on a notes app and when I create a new note, firestore generates a random id to store it. But when I access it back, I want it to remain at top but instead it gets somewhere in the middle. How to fix this?
If any one had an error like: length is null, the error is in the Firebase rules! You just needed to change it from " read, write if false; " to " read, write; " Though, this is not secure! You just use this for testing proposes, if you are going to deal with the real world and publishing you app, please consider reading the "Firebase rules documentation" first! .. Hope this help! =)
Thanks for the tutorial. I wanted to expand this and had a question. Q. I have a DB with data like ID, Name, Desc and Location. Where I wanted to categorise the returned collection into a different location. Ex: 1, test, testDesc, USA 2, test2, testDesc, Mexico 13 test3, testDesc, USA Once the _data (a Future) gets the data. Can it be managed into Lists of Array? Any suggestions here, please.
Amazing video Samarth. In detailPage, instead of having a container in "body" I am trying to call a class which takes an argument. And I am sending the argument as widget.post.data["some key"]. But when I am trying to use the sent value in the class I am getting value as null. Can you help me with this.
Hey Samarth I am using a bottom navigation bar and everytime i switch tabs the page reloads do you know any way by which i can stop it from reloading the pages?
Thanks Samarth. Is it possible to share the above code in your github account? Thanks for your super cool FlutterScreens and your effort to share your knowledge. Much appreciated!
Anyone get this error after trying to use firestore --> library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1
great tutorial but I had a lot of errors: The operator '[]' isn't defined for the type 'Object' when trying to display the title of the post on the details page I solved it by casting "as DocumentSnapshot". I also changed the type Snapshot to AsyncSnapshot because it was throwing an error.
The getter 'length' was called on null. Receiver: null Tried calling: length i entered firebase and it is connected, but it says they are empty ... how
@@mateusflores9975 try adding a if(connectionState == connectState.loading){ return Text(‘No connection’) } else { return ListView like this , because the length hasn’t gotten from the firebase and it’s null and it doesn’t have time to execute
what if I have a subcollection within each post on my firestore data base, lets say "relatedposts"? how do I query each post so that when navigating to the details page, the subcollection data should also show up?
This is a good example. I want to know that how we authenticate with the email and password. and another question is that how we can show the list per user (means the different users may have the different lists)?. can you please guide regarding with..?
Current state of connection to the asynchronous computation. 'connectionState' can't be used as a setter because it's final. Try finding a different setter, or making 'connectionState' non-final. plss help....
THIS PART IS NOT WORKING Firestore.instance and return qn.documents gives error please help Future getFaculty() async { var firestore = Firestore.instance; QuerySnapshot qn = await firestore.collection("faculty").getDocuments(); return qn.documents; }
Thank a lot for the great video brother. I am new to programming and I have just started using Flutter. I have a question, I am planning to make a photo gallery app that has a main category and each main category segues to subcategory and then each subcategory segues to a list of images. Can I do that using firebase? And if you may, can provide with me tips please?
Yes. Sure you can do it with Firebase. Use Firebase Storage for storing images, get the URL and save the URL in a document. One document per image. In the same document, store information like category, tags and whatever you want.
I am getting an error before list display error - NoSuchMethodError: The getter 'length' was called on null . is this because of await this error only shows for a second any idea how can I avoid it
Good video, thx a lot. Can you show the name or the avatar image for the user who post the post your are using??? because I see that in post collection your are using owner with a id. please help me a have that problem
Hey guys, come someone please help me? I have the same setup as this. However, I want to add a feature to sort the post list. My setup goes like this... I have a separate ListView (vertical) which is the categories. Now when a user clicks this, I want to sort the post list. Can someone please help me?
at the end of this video you explain how to stop your listview.builder to rebuild after navagating to next pange .....can you do this for stram builder its rebuilding everytime ..................
@@garethtaufao Check your firestore Rules. My firestore rule was denying permission to read my data. So I changed the Rules to: allow read; allow write: if false;
The operator '[]' isn't defined for the type 'Object? Function()'. sir i am having this error while getting data in detail page in title or in subtitle what can i do?
@@thesamarthagarwalwould it be another call from firestore to have the detail page list for horizontal scroll? If it's not too much for you..will you please put out a tutorial about it? Thank you in advance 😊❤️
@@vlycie6628 if you have that data, then you can pass it to the detail page (saving the call) but if you don't have it, you will have to make an extra call to get that data.
@@thesamarthagarwal yes i've done it. Thanks ❤️ But I can't seem to have this: I click on the listview item(item 1), i land on the detail page(detail of item 1), still on the detail page of item 1, I swipe to the left to go to the detail page of item 2. can't seem to find solution online
Problems may arise as a result of updating packages sometimes. Future getPosts() async { var firestore = Firestore.instance; Query q = firestore.collection('post'); QuerySnapshot querySnapshot = await q.getDocuments(); return querySnapshot.documents; }
True. For that you should subscribe to the snapshots() and use a StreamBuilder instead. Using the FutureBuilder with the future that calls Firebase directly is exhaustive and in real apps, will result in huge Firebase bills.
Anybody please help me I/flutter (10297): The following NoSuchMethodError was thrown building FutureBuilder(dirty, state: I/flutter (10297): _FutureBuilderState#fc53c): I/flutter (10297): The getter 'length' was called on null. I/flutter (10297): Receiver: null I/flutter (10297): Tried calling: length
I make an app in flutter and backend use firebase real time database......so I fetch the data on home screen(in ListView) then I want to send particular selected data(select from listview) on next screen @@thesamarthagarwal
I doubt anyone has actually tried making this app. Because I got an error and I don't understand how in this video everything just worked fine. Similarly, one more video of this channel I was getting error but these videos don't show any error I don't know how!!!!
Thanks for this very instructive Flutter tutorial. I subscribed to your Udemy "Ionic 3 Apps for WooCommerce" course. Is there any chance of you doing a Udemy "Flutter Apps for WooCommerce" course?
Thank you Gil. I am thinking about it now because a lot of wonderful people have reached out to me regarding that. I will keep everyone posted about it.
If you get errors about Firebase app not being configured, you need to open the iOS workspace in XCode and add the GoogleService-info.plist to the runner project. I had to edit out that step in the video because of some audio issues.
hello i want to get list of all registered user in firebase using flutter... how can i do that ... any idea
you have no idea how much your videos have helped me! i accidentally deleted my files and you brought it back to existence again with these tutorials.
thank you so much 😄
I couldn't. can you help me?
This is the best flutter video I've ever watched. I wish Google would hire you to make the tutorial videos. Very nice! Thank you for sharing 😊
Absolutely agree!!
for anyone watching in 2021 the snapshot syntax has changed to snapshot.data[index].data()["yourFieldName"]. Note the data() function called on the document of the snapshot array
man, you're awesome :D
you are my hero💖
I was totally confused about two days. You just save me brother. Thank you so much.
Thx for the amazing vid. The important part is the last section. U should have expand it longer or explain that first, otherwise some people like me find it boring.
You literally saved my life! Thank you so much. You are an amazing soul!
You just saved hell of research for me... Thank U so much ❤️
I was wondering why you didnt use the StreamBuilder
dost aapne to raaton neend wapis laadi, shukriya. My code is working now!
Hi...Do you know why when ever I tried to run my code, the app won't lunch in simulator. It keep running runing on my vscode but never show up on my simulator. I'm not sure If it's something related to firebase that cause that problem. I'm just curious how you was able to run that. thanks
Incredible video - amazingly clear and beautifully designed! THANK YOU
thiss iss exactly WHAT I WAS LOOKING FOR PAST FEW DAYSSS thankkkk u sooo muccchh for thiss!!!
I feel you man😂
Awesome video! Thank you, Sir!
If you have dynamic documents you need to listen I'd recommend to use StreamBuilder instead of FutureBuilder
why, can you please explain ?
@@tint2483 FutureBuilder = callback
StreamBuilder = observer
waoooo such amazing content and explanation. you save my day thinks brother.
hope you will make more videos like this. waiting to watch more flutter videos from your channel
Your video lessons are perfect !! I learn a lot from your didactics. Make more videos !! Thank you!
snapshot.data.length in the itemc
ount does not work: "The gtter 'length' was called on null
@@increadibleangel7980 You should check that your snapshot has data or not.
if(snapshot.hasData){
then return this widget.
}
else{
return this widget.
}
@@mdtouseefraza3458 ok
Awesome and best flutter video. 😊
Absolutely amazing explanation of Flutter Firebase integration
very usefull,
please make more tutorial,
thats awaresome
The quality of your videos are amazing so kindly make more videos covering more topics.
1 number bhai , very good explaination, 💙 se thanks.
very nice explanation
Samarth Agarwal Thanks for your Videos Have Benefited a lot... being inspired by your Videos Happen to have created a channel
You really awesome man 🙏❤ i wish you all the luck and all the success .
amazing tutorial..new subscriber here...i'm new to flutter and all..and i'm learning a lot from you.thank you
how did he made the documents in firestore. Who will teach that?
Thanks brother , it helped me a lot you can't imagine :)
Amazing video. i have a question how we can add scroll bar in list view builder
@Samarth Agarwal. Can you make a tutorial about how we can add search functionality to this project. If you can't, do you know is there other tutorial video that I can follow to add search function. Thank you
im having a huge time following along since i get errors way earlier and only get nulls and length problems
@Samarth Agarwal thank you for this amazing tutorial! Just in time when I needed it :)
Quick question-- now that I go this to work, how can I incorporate all these calls using models?
I've heard it can be more organized this way and more efficient.
What'a a good place to start using models with Cloud Firesotore?
1000% grateful!
Thank you so much. A great example
Your video is very usefull thank you buddy
You save my days..thanks!
This is amazing. I have one doubt though - I am working on a notes app and when I create a new note, firestore generates a random id to store it. But when I access it back, I want it to remain at top but instead it gets somewhere in the middle. How to fix this?
If any one had an error like: length is null,
the error is in the Firebase rules! You just needed to change it from " read, write if false; " to " read, write; "
Though, this is not secure! You just use this for testing proposes, if you are going to deal with the real world and publishing you app, please consider reading the "Firebase rules documentation" first! ..
Hope this help! =)
Brilliant work.
Hi, very nice. thank you. just a question, why MyHomePage is stateful rather than stateless?
thank you
You're the best. thank you very much
Thanks for the tutorial.
I wanted to expand this and had a question.
Q. I have a DB with data like ID, Name, Desc and Location. Where I wanted to categorise the returned collection into a different location.
Ex: 1, test, testDesc, USA
2, test2, testDesc, Mexico
13 test3, testDesc, USA
Once the _data (a Future) gets the data. Can it be managed into Lists of Array? Any suggestions here, please.
Amazing video Samarth. In detailPage, instead of having a container in "body" I am trying to call a class which takes an argument. And I am sending the argument as widget.post.data["some key"]. But when I am trying to use the sent value in the class I am getting value as null. Can you help me with this.
Great Work Bro !
Thnx for making this tutorial!!!
Very good and keep it up bro.....
This lection is amazing, you are great friend :)
Hey Samarth I am using a bottom navigation bar and everytime i switch tabs the page reloads do you know any way by which i can stop it from reloading the pages?
Hi!
Please, how to check if a snapshot already exists in the firestore? we have a big mistake when the data is empty (null)
Thanks Samarth. Is it possible to share the above code in your github account? Thanks for your super cool FlutterScreens and your effort to share your knowledge. Much appreciated!
Flutter screens on github, thanks for sharing
Thx for this video. I create a textfield for search, but i can't put to work.
Can u help me pls?
Anyone get this error after trying to use firestore --> library
com.google.android.gms:play-services-base is being requested by various
other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1
great tutorial but I had a lot of errors:
The operator '[]' isn't defined for the type 'Object' when trying to display the title of the post on the details page I solved it by casting "as DocumentSnapshot".
I also changed the type Snapshot to AsyncSnapshot because it was throwing an error.
Plz tell me how to solve this..
@@ShreyashGajbhiye-su9dc I'm sorry I don't remember how
The getter 'length' was called on null.
Receiver: null
Tried calling: length
i entered firebase and it is connected, but it says they are empty ... how
i have the same error, did u fix it?
@@mateusflores9975 try adding a if(connectionState == connectState.loading){
return Text(‘No connection’) } else { return ListView like this , because the length hasn’t gotten from the firebase and it’s null and it doesn’t have time to execute
@@mateusflores9975 I have already fixed it , u need an if else state beforehand
@@MrCyKaOWN thanks bro, i'll try.
@@MrCyKaOWN where do i put this
what if I have a subcollection within each post on my firestore data base, lets say "relatedposts"? how do I query each post so that when navigating to the details page, the subcollection data should also show up?
This is a good example. I want to know that how we authenticate with the email and password. and another question is that how we can show the list per user (means the different users may have the different lists)?. can you please guide regarding with..?
Current state of connection to the asynchronous computation.
'connectionState' can't be used as a setter because it's final.
Try finding a different setter, or making 'connectionState' non-final.
plss help....
THIS PART IS NOT WORKING Firestore.instance and return qn.documents gives error please help
Future getFaculty() async {
var firestore = Firestore.instance;
QuerySnapshot qn = await firestore.collection("faculty").getDocuments();
return qn.documents;
}
Thank a lot for the great video brother. I am new to programming and I have just started using Flutter. I have a question, I am planning to make a photo gallery app that has a main category and each main category segues to subcategory and then each subcategory segues to a list of images. Can I do that using firebase? And if you may, can provide with me tips please?
Yes. Sure you can do it with Firebase. Use Firebase Storage for storing images, get the URL and save the URL in a document. One document per image. In the same document, store information like category, tags and whatever you want.
I am getting an error before list display error - NoSuchMethodError: The getter 'length' was called on null . is this because of await this error only shows for a second any idea how can I avoid it
Is it possible to do a ListView of all fields in a DocumentSnapshot without knowing the field names?
How do I search and filter the listed items, sir? Can you help with that please?
Good video, thx a lot. Can you show the name or the avatar image for the user who post the post your are using??? because I see that in post collection your are using owner with a id. please help me a have that problem
how to fetch data from firestore to an product list models then display in list view widgets instead of directly fecthing it from firestore
Hi can i use streambuilder or do i have to use futurebuilder??
Great tutorial! Really love it!
Which code should I write to get this list sorted?
Hey guys, come someone please help me? I have the same setup as this. However, I want to add a feature to sort the post list.
My setup goes like this... I have a separate ListView (vertical) which is the categories. Now when a user clicks this, I want to sort the post list. Can someone please help me?
at the end of this video you explain how to stop your listview.builder to rebuild after navagating to next pange .....can you do this for stram builder its rebuilding everytime ..................
Awesome man! Can you make a video with compound queries please??
Sir please make video on angular 6 and seperate video on firebase
Could you give me some lesons of Provider, stream, to provide querysnapshots?
how to update the firestore field data from the Application. Please answer quick
snapshot.data.length in the itemcount does not work: "The gtter 'length' was called on null". Help please :3
Were you able to fix this issue?
I get the same error as well
@@garethtaufao Check your firestore Rules. My firestore rule was denying permission to read my data. So I changed the Rules to:
allow read;
allow write: if false;
@@tuelimishane thanks did it work for you? I'll give it a try.
@@garethtaufao yes it did
how to check if a snapshot already exists in the firestore?
thank you very much !!!!!!!!!!!
The operator '[]' isn't defined for the type 'Object? Function()'.
sir i am having this error while getting data in detail page in title or in subtitle what can i do?
If you got the solution plz tell me ..
I just subscribed to this channel..great content.. i have a question . How can I make the detail page be like a pageview scroll to left or right?
Put the PageView on the detail page. You can use a PageViewController to set the default page of the PageView.
@@thesamarthagarwalwould it be another call from firestore to have the detail page list for horizontal scroll?
If it's not too much for you..will you please put out a tutorial about it? Thank you in advance 😊❤️
@@vlycie6628 if you have that data, then you can pass it to the detail page (saving the call) but if you don't have it, you will have to make an extra call to get that data.
@@thesamarthagarwal yes i've done it. Thanks ❤️
But I can't seem to have this: I click on the listview item(item 1), i land on the detail page(detail of item 1), still on the detail page of item 1, I swipe to the left to go to the detail page of item 2.
can't seem to find solution online
Hi Samarth, thanks for sharing this video, i use your code in my app. How to apply Searchdelegate in this project? Hope you can help me.
Thanks 😍
How to implement with search bar. ?
Problems may arise as a result of updating packages sometimes.
Future getPosts() async {
var firestore = Firestore.instance;
Query q = firestore.collection('post');
QuerySnapshot querySnapshot = await q.getDocuments();
return querySnapshot.documents;
}
await is causing problem at the start it gives null for length
if we move the getPosts() in the initState we will not get an updated collection .. in case we add a document while the app is running
True. For that you should subscribe to the snapshots() and use a StreamBuilder instead. Using the FutureBuilder with the future that calls Firebase directly is exhaustive and in real apps, will result in huge Firebase bills.
NIce Work
Thanks
how to get next value on master detail page ?
How can i Display json data using GridView
Anybody please help me
I/flutter (10297): The following NoSuchMethodError was thrown building FutureBuilder(dirty, state:
I/flutter (10297): _FutureBuilderState#fc53c):
I/flutter (10297): The getter 'length' was called on null.
I/flutter (10297): Receiver: null
I/flutter (10297): Tried calling: length
I got the same error I think it because of await
How to show specific data/post?
Nice ...
I am getting an error as The getter length was called on null. Somebody tell me what to do.
Call .length only when snapshot.data is not null.
how to show owner data in list? please help me
I am getting an error "Getter length was called on null" at itemCount: snapshot.data.length,. any idea?
Future getPosts() async {
var firestore = Firestore.instance;
Query q = firestore.collection('post');
QuerySnapshot querySnapshot = await q.getDocuments();
return querySnapshot.documents;
}
Just fix this
can you share the code of this tutorial?
Here is the first part codigo of the code, I am getting an error " the getter length is called null"
import 'package:flutter/material.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(widget.title), ), body: ListUsers(), // ); } } //WIDGET 1 class ListUsers extends StatefulWidget { @override _ListUsersState createState() => _ListUsersState(); } class _ListUsersState extends State { Future getUsers() async { var firestore = Firestore.instance; QuerySnapshot qn = await firestore.collection('users').getDocuments(); return qn.documents; } @override Widget build(BuildContext context) { return Container( child: FutureBuilder( future: getUsers(), builder: (_, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { return Center( child: Text('LOADING...'), ); } else { return ListView.builder( itemCount: snapshot.data.length, itemBuilder: (_, index) { return ListTile( title: Text(snapshot.data[index].data["email"]), ); }); } }), ); } } //WIDGET 2 class DetailUsers extends StatefulWidget { @override _DetailUsersState createState() => _DetailUsersState(); } class _DetailUsersState extends State { @override Widget build(BuildContext context) { return Container(); }
How can I pass the firebase database from one screen to another screen ?
Sorry, I did not understand. Can you please explain your question?
I make an app in flutter and backend use firebase real time database......so I fetch the data on home screen(in ListView) then I want to send particular selected data(select from listview) on next screen
@@thesamarthagarwal
I doubt anyone has actually tried making this app. Because I got an error and I don't understand how in this video everything just worked fine. Similarly, one more video of this channel I was getting error but these videos don't show any error I don't know how!!!!
Good
but the serialization?
Thanks for this very instructive Flutter tutorial. I subscribed to your Udemy "Ionic 3 Apps for WooCommerce" course. Is there any chance of you doing a Udemy "Flutter Apps for WooCommerce" course?
Thank you Gil. I am thinking about it now because a lot of wonderful people have reached out to me regarding that. I will keep everyone posted about it.
THANKS
yapamadım hocam...
what next ?