Flutter Fetch Data from Firebase | Fetch and Display Products on Grid

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2023
  • In this comprehensive Flutter tutorial, we unlock the potential of Firebase to seamlessly fetch products and dynamically display them on a grid in your Flutter app.
    ► Complete E-Commerce App Playlist : • Professional Flutter E...
    🎊 E-COMMERCE APP
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    🎁 DOWNLOAD SOURCE CODE: codingwitht.com/product/flutt...
    ❤️ FLUTTER E-COMMERCE APP PLAYLISTS
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ► Complete E-Commerce App : • Professional Flutter E...
    ► Section - 1 Configuration : • Professional Flutter P...
    ► Section - 2 Login App : • Professional Flutter P...
    ► Section - 3 eCommerce UI : • Flutter Complete Ecomm...
    ► Section - 4 Login Backend: • Flutter Firebase Cours...
    ► Section - 5 eCommerce Backend: • Flutter E-Commerce App...
    ❤️ SUBSCRIPTIONS
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ► Join Patreon to Access Premium Content: / membership
    COURSES
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ► FLUTTER CRASH COURSE • Flutter Crash Course f...
    ► LOGIN APP FIREBASE • Flutter Login App - UI...
    🧑‍💻 RELATED VIDEOS
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    ► Home Screen Design(categories): • Search Bar and Horizon...
    ► Tab Bar Design : • TabBar in Flutter with...
    ► GetX Basics: • Flutter Firestore CRUD...
    CHAPTERS
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    00:00 Introduction
    FOLLOW US ON SOCIAL MEDIA
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    💻 Facebook | / codingwithtea
    💻 Instagram | / coding_with_tea
    Here's a detailed breakdown of what we'll cover:
    ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
    Join Coding with T in this comprehensive Flutter tutorial, where we unlock the potential of Firebase to seamlessly fetch products and dynamically display them on a grid in your Flutter app. Whether you're a Flutter enthusiast or an experienced developer, this guide is tailored to optimize your app's performance and enhance the visual representation of your products.
    📖 Video Overview:
    Introduction: Immerse yourself in the world of dynamic app optimization as we leverage Firebase to fetch products and create visually appealing grids in Flutter.
    Tutorial Breakdown: Dive into a detailed breakdown of each step, ensuring a comprehensive understanding of product retrieval and dynamic grid display.
    🔍 Key Tutorial Insights:
    Fetching Products from Firebase: Master the Flutter coding process to dynamically fetch products from Firebase, streamlining your app's data retrieval.
    Dynamic Data Display on Grid: Learn how to seamlessly showcase products on a grid, providing an optimized visual representation for users in your Flutter app.
    👩‍💻 What You'll Learn:
    ✔️ Fetching products from Firebase in Flutter for streamlined data retrieval.
    ✔️ Creating dynamic grid displays to visually showcase products in an optimized layout.
    🌟 Why Watch?
    Whether you're a Flutter enthusiast or a developer seeking to optimize your app's visual representation, this tutorial provides actionable insights for product fetching and dynamic grid displays. Subscribe, like, and hit the bell icon for more app optimization tutorials from Coding with T!
    #FlutterFirebase #ProductFetching #FirebaseOptimization #FlutterGridDisplay #FirebaseTutorial #FlutterTutorial #OptimizeFlutterApp #CodingWithT #VisualRepresentation
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 103

  • @RamdanCode
    @RamdanCode 7 หลายเดือนก่อน +3

    Absolutely fantastic tutorial! 🚀 Your step-by-step guide on fetching data from Firebase and displaying products on a grid in Flutter is incredibly helpful and well-explained. 👏 The clarity of your instructions made it easy for me to follow along and implement the same in my project. Thank you so much for sharing your expertise! 🙌 Looking forward to more insightful Flutter tutorials from your channel. Keep up the excellent work! 🌟 #FlutterDevelopment #FirebaseMagic #GratefulViewer

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      You're very welcome! 😊

  • @geiseebag8754
    @geiseebag8754 4 หลายเดือนก่อน

    Hey Taimoor, excellent tutorial like always although I have some problems with the first part of the video how am I supposed to add that dummy data in every document, like everytime I add a new document I have to retype the field names isn't there a more sufficient way of doing it?

  • @user-ew3sj4wc1n
    @user-ew3sj4wc1n 7 หลายเดือนก่อน

    Thank you💯💯💯💯💯

  • @eshu9838
    @eshu9838 4 วันที่ผ่านมา

    in which video you created brand models?? i'm having errors

  • @Animelover-hm1mm
    @Animelover-hm1mm 4 หลายเดือนก่อน

    I got error String is not subtype of bool and I don't know what cause this code is same as yours

  • @juicewrld498
    @juicewrld498 7 หลายเดือนก่อน +1

    I really like the way you’re explaining every bit of the code I really appreciate that ❤
    But please can i ask where can i download dose animation you used on the onboarding screen so that i can use a different one and please can you make a video on how to insert form data in firebase am new in app development 🙏🙏
    I really appreciate your work here and i can’t for the next video to drop

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      Thank you for your support and Love.
      To upload foam data you should watch the section 4 video in which we already stored user data received from the foam.

    • @juicewrld498
      @juicewrld498 7 หลายเดือนก่อน +1

      @@CodingwithT thank you for your reply. i know about that part but how can i add images to it

    • @murtazaali9346
      @murtazaali9346 หลายเดือนก่อน

      u can store images in firebase storage and then assign url to your variable userProfile. For further details please watch the tutorial again.

  • @user-mv9iz7uu6w
    @user-mv9iz7uu6w 7 หลายเดือนก่อน +1

    i think better to use json then import it to firebas then it will convert to colletion this way faster

  • @wseymondzongo100
    @wseymondzongo100 7 หลายเดือนก่อน

    Very good! I met an issue. In the previous tutorial when I ran and clicked on one of my banners it redirected to the concerning page but the app bar disappeared!

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      You are right and the reason is that you use simple redirect but if you are using Bottom Navigation then you must call your Menu Class and pass the index in order to have bottom navigation

    • @wseymondzongo100
      @wseymondzongo100 7 หลายเดือนก่อน

      @CodingwithT Okay thank how to do this??

  • @Hamza-yq7sj
    @Hamza-yq7sj 7 หลายเดือนก่อน +2

    Are you implementing notifications?

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน +1

      I will try

    • @Hamza-yq7sj
      @Hamza-yq7sj 7 หลายเดือนก่อน

      @@CodingwithT please notifications must

  • @aanmeegam.arivom
    @aanmeegam.arivom 7 หลายเดือนก่อน

    Brother all videos are so much interactive. You will create admin module right bro??

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน +1

      Yes I will

  • @Jack-xp9qp
    @Jack-xp9qp 14 วันที่ผ่านมา

    Hi thanks for this tutorial, how can i add more collection at home screen like (men product horizontal) (women) (best seller) (new arrivals) did i create model screen and controller and repository for each collecthion?

    • @CodingwithT
      @CodingwithT  14 วันที่ผ่านมา

      You welcome,
      In order to achieve that, you do not have to create any collection rather add a new keys in that same product collection like productFor Gents or Ladies?
      You can get new arrivals using Date.
      For the best Sellers you have to keep count of each product sale and then show much sold once.

    • @Jack-xp9qp
      @Jack-xp9qp 14 วันที่ผ่านมา

      @@CodingwithT Thanks for your reply but you didn't explain how to present them to home screen how can i show collection 1 by 1 on main home screen there only a grid view for example i want create horizontal for each collection

    • @CodingwithT
      @CodingwithT  14 วันที่ผ่านมา

      @Jack-xp9qp Just reuse that grid view again with new data.
      Just change the query to fetch your data

  • @gopikrishnan8999
    @gopikrishnan8999 4 หลายเดือนก่อน

    You didn't show how to create products collections in firebase pls let me know how to make that part could you pls explain iam confused

  • @ahmedtarek8676
    @ahmedtarek8676 7 หลายเดือนก่อน

    what statement widget you using (bloc or getx or provider )?

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      We are using Getx but you can use any state management technique 😊

    • @ahmedtarek8676
      @ahmedtarek8676 7 หลายเดือนก่อน

      how its difficult please give me step or (how to do that ) to achieve this concept @@CodingwithT

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน +2

      If you want to follow this state management (GetX) you just have to follow the tutorials.
      If you want to go for some other state managements you can create the design and as a back-end use other state managements.

  • @ryansumbele3552
    @ryansumbele3552 5 หลายเดือนก่อน +1

    Please i'm getting error null check operator used on null value. the relevant error causing widget was TProductCardVertical. please help me

    • @ryansumbele3552
      @ryansumbele3552 5 หลายเดือนก่อน +1

      the error comes from product controller.getProductPrice. the null operator used in productVariations is causing my app to crash please help

    • @CodingwithT
      @CodingwithT  5 หลายเดือนก่อน

      To resolve the "null check operator used on null value" error in your TProductCardVertical widget, you should handle null values in your model's property. Using the null-aware operator (??) as you suggested is a good approach. for example if your property is description then you will use as description: data['Description'] ?? '', if the data is integer then price: double.parse((data['Price'] ?? 0.0).toString()),

    • @fizz1028
      @fizz1028 2 หลายเดือนก่อน

      bro you fixxed it is error?

  • @Suleiman-PC
    @Suleiman-PC 7 หลายเดือนก่อน +2

    I swear to god last night I dream about this video 🤗

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน +1

      So nice of you @Suleiman and thank you for your love and support 💗

  • @CyberWu
    @CyberWu 7 หลายเดือนก่อน +2

    Sir, I followed your video step by step to write code to get here !!!😉 But I'd like to know how to get DummyData here, and can you provide a copy? Thanks again 🙏

    • @murtazaali9346
      @murtazaali9346 หลายเดือนก่อน

      exactly, we need a DummyData class.

  • @md.tarekulislamtorjoy8923
    @md.tarekulislamtorjoy8923 4 หลายเดือนก่อน

    hey the dummy data file isn't in source code. could you keep the file in Source Code?

    • @PrathamMakwana-wr5lv
      @PrathamMakwana-wr5lv หลายเดือนก่อน

      @PrathamMakwana-wr5lv
      0 seconds ago
      hey any one done with the app. Please Provide The githhub repository link so we can refer it and the upload section code to upload in the firestore

  • @map-dev
    @map-dev 7 หลายเดือนก่อน

    hello sir I love your training but I encountered a difficulty in the video you did not show how you did to insert the image url in firebase so that it is displayed locally. please I need help thanks for the advance

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      I've created a tutorial about the user profile picture to upload and use the url to show the image.

    • @map-dev
      @map-dev 7 หลายเดือนก่อน

      @@CodingwithT ok sir thanks

    • @PrathamMakwana-wr5lv
      @PrathamMakwana-wr5lv หลายเดือนก่อน

      @PrathamMakwana-wr5lv
      0 seconds ago
      hey any one done with the app. Please Provide The githhub repository link so we can refer it and the upload section code to upload in the firestore

  • @AbdulRehman-cj4xl
    @AbdulRehman-cj4xl 2 หลายเดือนก่อน

    Hi, my name is Abdul Rehman from Pakistan, hope you are fine,
    I want need your help . Dummydata are Not uploading on Firestore and Firebase Storage. Please confirm me. Are you implement Dummydata on project.

    • @CodingwithT
      @CodingwithT  2 หลายเดือนก่อน

      Message Coding with T on WhatsApp. wa.me/447456285429

  • @sohelindian1988
    @sohelindian1988 5 หลายเดือนก่อน

    While uploading dummy data, Only Variable Product Type product is stored in the firebase. Kindly help me

    • @CodingwithT
      @CodingwithT  5 หลายเดือนก่อน +1

      I’ll show the upload part in the admin panel Course which will be started from the next week on Patreon. Stay tuned

    • @HungNV36
      @HungNV36 4 หลายเดือนก่อน

      Where can I get the link to follow you?@@CodingwithT

  • @DiamondSoft
    @DiamondSoft 6 หลายเดือนก่อน

    I don't know Sir but to save Brand data in each item its make me confused , do you think its good approach? Please guide me, why we don't make Brand Model and linked it to the item this is not Wasted Database size , and no duplicated in the data , even for ProtectAttributes we make ProtectAttributes Model and save All averrable Attributes there and link what we need to the item model by saving Attributes Id as will as ProtectVariations , what you think Sir

    • @CodingwithT
      @CodingwithT  6 หลายเดือนก่อน

      Excellent question ❓.
      The reason is that Firebase doesn't care about data duplication rather focused on speed and also Firebase charges are based on No of document reads and writes. Not like SQL which usually depends on the Size.
      So we know 90% of the time brands never change anything in their data that's why we added everything in one document

    • @DiamondSoft
      @DiamondSoft 6 หลายเดือนก่อน

      @@CodingwithT Hello Sir , Maybe I Agree with you , but honestly because I'm come From SQL Database background this is make me don't accept that , for example if one of this brands or any other joint model data changed do you know this is disaster , if you have app with Thousands of items , you can imagen the admin feeling , honestly I don't accept this I put each model suppurated , and when fetch the data I link it together so every time data loaded take the changes in joint models

  • @Mrlikeandshare
    @Mrlikeandshare หลายเดือนก่อน

    thanks sir but i still have probleme when i run my the populaire product shows me message ''no data found' and when i go to see all i found erreur messagen 'null check operator used on all value '

    • @Chien-ie2cy
      @Chien-ie2cy 28 วันที่ผ่านมา +1

      I have the same problem as you, have you solved it yet? Please let me know

    • @Mrlikeandshare
      @Mrlikeandshare 28 วันที่ผ่านมา

      @@Chien-ie2cy no not yet sorry

    • @CodingwithT
      @CodingwithT  18 วันที่ผ่านมา

      It seems like you're encountering a null check operator issue in the vertical card product file. To address this, you can use the null-aware operator (??) in your model.
      For instance, in the model file, where you're accessing the description data, you can use:
      description: data['Description'] ?? ' ',
      This ensures that if the data['Description'] is null, it'll default to an empty string, preventing null-related errors.
      Let me know if you need further clarification or assistance!

  • @domcareer4048
    @domcareer4048 3 หลายเดือนก่อน

    how to add category image i face a unable to load asset in category please reply

    • @CodingwithT
      @CodingwithT  3 หลายเดือนก่อน

      You have to add image like I added profile screen image in Profile Video.

  • @xtremestudios3836
    @xtremestudios3836 6 หลายเดือนก่อน +1

    i am getting null is not a subtype of type List in a cast and on screen no data found

    • @anashomaid144
      @anashomaid144 6 หลายเดือนก่อน

      me too

    • @ryansumbele3552
      @ryansumbele3552 5 หลายเดือนก่อน

      please how did you solve this problem, i am facing it too

    • @aladdinsonni
      @aladdinsonni 4 หลายเดือนก่อน

      me too

    • @belfrest1322
      @belfrest1322 3 หลายเดือนก่อน +1

      @@aladdinsonni Hello, did you manage to solve the problem?

    • @belfrest1322
      @belfrest1322 3 หลายเดือนก่อน

      @@anashomaid144 Hello, did you manage to solve the problem?

  • @ronaldokhadka
    @ronaldokhadka 7 หลายเดือนก่อน +1

    Plz can you finish jt faster? Like before new year? Much Love ❤❤❤

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน +1

      Will be completed by the end of this week or next week

  • @fizz1028
    @fizz1028 2 หลายเดือนก่อน

    "Null check operator used on a null value"
    products do not load from Firebase and shows an error in brand!
    tell me how to fix it. Please
    HomeScreen shows "No Data Found!"

    • @CodingwithT
      @CodingwithT  2 หลายเดือนก่อน +1

      This means you are accessing string and assigning it to the String variable, but null is being assigned to that string.
      Probably it happens sometimes when accessing the code from local storage or some where else.
      You can find and add ?? Next to the String and then empty string to avoid receiving null.
      email = storage.read(Key) ?? “”;
      In your case I think it’s your product model and some of its variable is getting null assigned
      Best,
      CwT Team

    • @fizz1028
      @fizz1028 2 หลายเดือนก่อน +1

      @@CodingwithT I wrote as you wrote in your video both in the cloud database and in the flutter code. Apart from me, several people got the same error. There is no specific solution written in them either.My error is that the data is not visible on the Popular products site. No data Found is written, but there is data in the Products collection in the cloud database.

    • @gautamsolanki3644
      @gautamsolanki3644 2 หลายเดือนก่อน

      ​ @fizz1028 mila bhai solution

    • @gautamsolanki3644
      @gautamsolanki3644 2 หลายเดือนก่อน

      mila solution

    • @fizz1028
      @fizz1028 2 หลายเดือนก่อน

      @@gautamsolanki3644 bro, i can't understand you, you write in english

  • @footballgrinta-8714
    @footballgrinta-8714 4 หลายเดือนก่อน

    I face a problem which is null check operator in vertical card product file

    • @CodingwithT
      @CodingwithT  4 หลายเดือนก่อน

      It seems like you're encountering a null check operator issue in the vertical card product file. To address this, you can use the null-aware operator (??) in your model.
      For instance, in the model file, where you're accessing the description data, you can use:
      description: data['Description'] ?? ' ',
      This ensures that if the data['Description'] is null, it'll default to an empty string, preventing null-related errors.
      Let me know if you need further clarification or assistance!

    • @fizz1028
      @fizz1028 2 หลายเดือนก่อน

      sir you fixxed it is error?

  • @ShahzodBurhonov
    @ShahzodBurhonov หลายเดือนก่อน

    hi BrandModel.fromSnapshot function is not shown at the end what to write please help

    • @CodingwithT
      @CodingwithT  หลายเดือนก่อน

      You should watch the brands backed video in which we created complete model

    • @eshu9838
      @eshu9838 2 ชั่วโมงที่ผ่านมา

      @@CodingwithT can you mention which video???

  • @leticiangomuo8702
    @leticiangomuo8702 5 หลายเดือนก่อน

    Please show a video on how to upload dummy data int upload data screen.. i fail to save data to firebase

    • @CodingwithT
      @CodingwithT  5 หลายเดือนก่อน

      I'm about to launch the Admin panel and there you'll be able to store and manage the store data easily

  • @sohelindian1988
    @sohelindian1988 5 หลายเดือนก่อน

    Kindly provide dummy data file. Jazakallah in adavnce

  • @unknownprogramme
    @unknownprogramme 3 หลายเดือนก่อน

    dummy data ki class provide kr dein

  • @ayushsahu7447
    @ayushsahu7447 7 หลายเดือนก่อน

    How much more videos are there in total?

    • @CodingwithT
      @CodingwithT  7 หลายเดือนก่อน

      6 to 7 left then we will start the payment gateways and after that admin panel

  • @shreyashgupta2706
    @shreyashgupta2706 23 วันที่ผ่านมา

    product controller error is coming
    No data found

    • @CodingwithT
      @CodingwithT  18 วันที่ผ่านมา

      I am sorry for your error. It might be an issue with the query or model. Kindly review it again.

  • @ukashaanwar9451
    @ukashaanwar9451 6 หลายเดือนก่อน

    facing problem in price range start from 0. smallestprice is 0

    • @CodingwithT
      @CodingwithT  6 หลายเดือนก่อน

      Make sure all your products have a price higher than 0.

  • @user-vl2uw6rb1v
    @user-vl2uw6rb1v 3 หลายเดือนก่อน

    "Null check operator used on a null value"
    products do not load from Firebase and shows an error in brand!
    line of code. TProductCardVertical
    TBrandTitleWithVerifiedIcon(title: product.brand!.name)
    tell me how to fix it. Please
    HomeScreen shows "No Data Found!"

    • @user-vl2uw6rb1v
      @user-vl2uw6rb1v 3 หลายเดือนก่อน

      GPT chat suggested fixing it to
      TBrandTitleWithVerifiedIcon( title: product.brand != null ? product.brand!.name : 'Unknown Brand'),
      after starting the application another error appears (ProductController)
      suggests replacing with
      if (product.productVariations != null) {
      for (var variation in product.productVariations!) {
      }}
      and after these changes an error appears "Invalid argument(s): No host specified in URI file:///"

    • @CodingwithT
      @CodingwithT  3 หลายเดือนก่อน +1

      You have to debug the code and check which variable is getting the null value. If you didn't find the error you can contact me on my whatsapp.

    • @fizz1028
      @fizz1028 2 หลายเดือนก่อน

      Hi. Do you fix it is error?

    • @gautamsolanki3644
      @gautamsolanki3644 2 หลายเดือนก่อน

      mila

    • @fizz1028
      @fizz1028 หลายเดือนก่อน

      @@gautamsolanki3644 you fixxing it is error?