Flutter Tutorial - FutureBuilder - Load JSON From Network & Local

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

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

  • @HeyFlutter
    @HeyFlutter  2 ปีที่แล้ว

    This might help you :)
    👉 12 Week Flutter Training from Newbie to Expert: heyflutter.com
    Source Code: github.com/JohannesMilke/futurebuilder_example
    Firebase CRUD Tutorial: th-cam.com/video/EV2DyrKOqrY/w-d-xo.html
    Firebase Pagination Tutorial: th-cam.com/video/IruuzPydPz4/w-d-xo.html
    Firebase Chat App Tutorial: th-cam.com/video/wHIcJDQbBFs/w-d-xo.html
    Google Sign In Tutorial: th-cam.com/video/ogW83xGQGTg/w-d-xo.html
    Email Sign In Tutorial: th-cam.com/video/rnHAInnjCmM/w-d-xo.html
    Preload Images Into Cache Tutorial: th-cam.com/video/M43XWGV3TE8/w-d-xo.html
    Skeleton Loading Screen Tutorial: th-cam.com/video/Z2kKlM1WfRY/w-d-xo.html
    Builder & Context Tutorial: th-cam.com/video/ALmd6jLqUK8/w-d-xo.html

  • @yoapps137
    @yoapps137 3 ปีที่แล้ว +5

    This is one of the most misunderstood widgets.. And I am so glad you covered it.. Because it can smoothen out your development process when you have a pause & need to await data. Thanx again :-)

  • @loldotcom955
    @loldotcom955 3 ปีที่แล้ว

    You are the best flutter developer on the internet so far.

  • @josephanyim9458
    @josephanyim9458 3 ปีที่แล้ว +2

    This is a great video, i do have an issue with loading data from the internet, I keep getting this.
    ''
    method not found
    Receiver: null
    Arguments: []
    Please help, thanks.

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thanks, Anyim! 🙂 Make sure to upgrade to Null Safety so that no Null errors can occur anymore.
      1) Null Safety In 5 Minutes Tutorial: th-cam.com/video/Q_WloMNKOkU/w-d-xo.html
      2) Migrate App To Null Safety Tutorial: th-cam.com/video/GLnQphHi1BY/w-d-xo.html

  • @bijayaadhikari442
    @bijayaadhikari442 3 ปีที่แล้ว +2

    Waiting this moment

  • @mwont
    @mwont 3 ปีที่แล้ว +1

    Awesome tutorial. Exactly what I was looking for. Thank you.

  • @viyanmohmad4576
    @viyanmohmad4576 ปีที่แล้ว

    you are the best , thank you for this amazing video

    • @HeyFlutter
      @HeyFlutter  ปีที่แล้ว

      Glad to hear that, You are welcome @viyanmohmad4576! 😊

  • @devdev8638
    @devdev8638 2 ปีที่แล้ว

    You are the best

  • @user-or7ji5hv8y
    @user-or7ji5hv8y 3 ปีที่แล้ว

    very well structured example

  • @neotomax
    @neotomax 3 ปีที่แล้ว +1

    Thanks for this good explanation. Very helpfull!!

  • @danilocarneirochristensen5892
    @danilocarneirochristensen5892 2 ปีที่แล้ว

    Hi, can I use futurebuilder to iterate on DataTable? And how to do it without the listview? Thanks from Brazil!

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank You DANILO CARNEIRO CHRISTENSEN! Follow this link: stackoverflow.com/questions/61242416/how-to-loop-through-a-list-to-populate-a-table-in-flutter-and-dart
      I hope you will get your answer 🙂

  • @manojpalitech
    @manojpalitech 3 ปีที่แล้ว

    Nice video with great logic.

  • @nima_laalzad
    @nima_laalzad 2 ปีที่แล้ว

    Hello, if I have a question about Flutter, how can I share it with you?

    • @nima_laalzad
      @nima_laalzad 2 ปีที่แล้ว

      ​@@HeyFlutter I can not put long questions and codes here, my questions are about the codes that I have trouble inside the filter.
      Can I contact you by email and send you my problems by email?

  • @LorenzoMoraldo
    @LorenzoMoraldo 2 ปีที่แล้ว

    It is awesome! Exactly what I was looking for. Thanks a lot!

  • @marco_di
    @marco_di 3 ปีที่แล้ว

    MEGA Tutorial :-)
    ist es eigentlich möglich eine 2 json Datei anzulegen, sodass beim Öffnen des Profils dort auch Daten sowohl aus der 1., als auch aus der 2. json-Datei mit eingesetzt/angezeigt werden können?

  • @djjavvystark5470
    @djjavvystark5470 3 ปีที่แล้ว

    Thank you this tutorial was so helpful to me.

  • @TheGaoNan
    @TheGaoNan 3 ปีที่แล้ว

    You are AWSOME!
    Thank you so much!

  • @ferrari.nikita33
    @ferrari.nikita33 3 ปีที่แล้ว

    Loved the video! But one question how do you prepare nested JSON data?

  • @VladVons
    @VladVons 3 ปีที่แล้ว

    Thank you to share this knowlages !

  • @user-jp88
    @user-jp88 3 ปีที่แล้ว

    Thank you for kind teaching. If I want to fetch some part of data(query data) from that json file, Is it possible or complex? If possible, I was wondering if I add any codes to this source.

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank you, Paul Jang! 🙂. You could learn more about fetching data from json file here: medium.com/hardwareandro/retrieving-json-data-in-flutter-c9ff12a05667

  • @ultramaxx1155
    @ultramaxx1155 3 ปีที่แล้ว

    Hey Johannes, I am looking for some sorta Future Widget that I can use through out my screens in my app

    • @ultramaxx1155
      @ultramaxx1155 3 ปีที่แล้ว

      @@HeyFlutter awesome! Thank you 😊

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank You Ultra Maxx! Follow this link: api.flutter.dev/flutter/widgets/FutureBuilder-class.html
      I hope you will get your answer 🙂

  • @johnpeter122
    @johnpeter122 3 ปีที่แล้ว

    Another Great Video.
    Thank you very much....

  • @top5products506
    @top5products506 3 ปีที่แล้ว

    Awesome videos bud. just a small request . can you please slow down a bit it will be very helpful

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

    Thank you❤

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

      You are welcome, @thushankalana4940 😊

  • @muhammadrasul1581
    @muhammadrasul1581 3 ปีที่แล้ว

    what if you dont make User.dart section? i mean why you made it to a list while you can ignore it but what is the matter of it?, plus what about multiple json files? thanks

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว +1

      Thanks, Muhammad Rasul! 🙂 It is more convenient to work with dart classes since it suggests you automatically the fields that you can use. Sure you use also multiple json files, the procedure is the same

  • @cavidanbagiri7837
    @cavidanbagiri7837 2 ปีที่แล้ว

    Teacher l want to ask you question. For example l want to create Facebook clone. When l click the username from page, New Page will Open and l will see all of user articles and user has 10000 articles. of course if l wait for downloading all articles , this will take a lot of times. How can l create as facebook that, when l scroll down, new articles will show in page. This is Stream or what? Can u help me pojalusta ?
    Thanks in Advance .

    • @cavidanbagiri7837
      @cavidanbagiri7837 2 ปีที่แล้ว

      Thanks teacher. I tried it and works perfectly.

  • @vianeyvargas7736
    @vianeyvargas7736 2 ปีที่แล้ว

    Greetings from Colombia, thank you very much for your video, can you please make a video with flutter_bloc 8? consuming rest api and using Widget flutter SliverList please.

  • @persistent_yt
    @persistent_yt 3 ปีที่แล้ว

    I want to access the integer value from json data.....!!! But it is showing error........!! Can you please help me...?
    Thank you....!!

    • @persistent_yt
      @persistent_yt 3 ปีที่แล้ว

      @@HeyFlutter Thank you so much for your reply.....!!! I have solved it.....!!!
      so the problem was to fetch the x and y value, which is in integer to plot the line graph. I used the quicktype website to create the model class and then after i simply called the FutureBuilder function.
      FutureBuilder(
      future: fetchItems(context),
      builder: (context, snapshot) {
      if (snapshot.hasData) {
      List ecg = snapshot.data;
      return _buildChart(context, ecg);
      }
      return CircularProgressIndicator();
      },
      ),
      Future fetchItems(BuildContext context) async {
      final jsonString =
      await DefaultAssetBundle.of(context).loadString('assets/data.json');
      return ecgFromJson(jsonString);
      }

  • @saitejd8108
    @saitejd8108 3 ปีที่แล้ว

    I have been searching for a good solution for my problem hope you may give it. Actually, I am fetching data from the backend using future builder, eveytime the widget rebuilds or the screen changes the future fires again and gets the same data. What I want is to fetch the data only once even page /screen changes and comes back.

    • @saitejd8108
      @saitejd8108 3 ปีที่แล้ว

      @@HeyFlutter Thank you for the reply. I have tried it but it only works for not firing future when state is rebuild. But actually what I want is not to fire the future even I navigate to another screen and pops it out. Simply to say, My requirement is I want to get data only once for the time he has opened the till he closes it. Just like in a dating app ex: bumble the user get suggestions/matches only once and like them or dislikes. I know this is some lengthy description but it will be helpful if you could get me some solution.

    • @saitejd8108
      @saitejd8108 3 ปีที่แล้ว

      Anything about this??

    • @opinionMe
      @opinionMe 2 ปีที่แล้ว +1

      @@saitejd8108 use future provider bro

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank you, TEJA DANDE! 🙂 you can assign your Future function to a Future variable and inside futureBuilder you can assign that future: futureVariable instead of future: futureFunction()

  • @jankenzimasangkay1504
    @jankenzimasangkay1504 3 ปีที่แล้ว

    in local json im having an error
    : Error: Member not found: 'fromJson'.
    return body.map(Plants.fromJson).toList();
    ^^^^^^^^

    • @jankenzimasangkay1504
      @jankenzimasangkay1504 3 ปีที่แล้ว

      also in buildUsers(users) my users is error.The argument type 'List?' can't be assigned to the parameter type 'List

  • @quicksketch1617
    @quicksketch1617 2 ปีที่แล้ว

    Thank you, for me it's better to watch videos to learn fast and your channel it's helping me to learn. How do you create the gifs from apps in github?

  • @mmtiktok3869
    @mmtiktok3869 3 ปีที่แล้ว

    thank you .. could you make tutorials on pm3 player with api

  • @mudassarkhan2298
    @mudassarkhan2298 3 ปีที่แล้ว

    What is the difference between Futurebuilder & Streambuilder? Please make video on this.

    • @mudassarkhan2298
      @mudassarkhan2298 3 ปีที่แล้ว

      @@HeyFlutter Thank you.

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว

      Thank You Mudassar Khan! Follow this link: flutteragency.com/what-are-streambuilder-and-futurebuilder-in-flutter/#:~:text=Both%20StreamBuilder%20and%20FutureBuilder%20have,JS%20or%20Task%20in%20c%23.
      I hope you will get your answer 🙂

  • @dev.faizan
    @dev.faizan 3 ปีที่แล้ว

    fetch json from network and save locally?

  • @GauravKumar-lx5vn
    @GauravKumar-lx5vn 2 ปีที่แล้ว

    Please make video on how to make posts like social media apps using firebase

  • @mohammedal-salehi4678
    @mohammedal-salehi4678 ปีที่แล้ว

    Could you teach me how I can do that using Getx package, please?

    • @HeyFlutter
      @HeyFlutter  ปีที่แล้ว

      Thank You Mohammed Al-Salehi! Follow this link: morioh.com/p/22899f34cea2
      I hope you will get your answer 🙂

  • @mohamedyashik1049
    @mohamedyashik1049 3 ปีที่แล้ว

    Mysql database to connect with flutter datatable to take video bro...

  • @StarBattle08
    @StarBattle08 3 ปีที่แล้ว

    Can you make a tutorial on getting XML data?

    • @StarBattle08
      @StarBattle08 3 ปีที่แล้ว

      @@HeyFlutter Thanks :D

  • @nima_laalzad
    @nima_laalzad 2 ปีที่แล้ว

    Hi
    Thanks For This Tuts
    Please Make Video TUTS To How Parse Nested Json In "Card" Or "ListView" Widget
    Thank You. ❤

  • @mdshahed5364
    @mdshahed5364 2 ปีที่แล้ว

    .map and. toList is not working in userApi class

    • @mdshahed5364
      @mdshahed5364 2 ปีที่แล้ว

      @@HeyFlutter what is the solution it’s still not working it’s 1.00 am in country but the problem is still irritating me!

  • @lyricsmint567
    @lyricsmint567 3 ปีที่แล้ว

    Kindly make videos on Real-time database.

    • @lyricsmint567
      @lyricsmint567 3 ปีที่แล้ว

      Like firebase realtime database where data updates in Real-time and visualized in app.

  • @imteam5001
    @imteam5001 2 ปีที่แล้ว

    Johannes Milke

  • @tharoseth8064
    @tharoseth8064 3 ปีที่แล้ว

    Nice

  • @sawzarnilinhtay470
    @sawzarnilinhtay470 3 ปีที่แล้ว

    sir starter source code please, next time.

  • @АлександрИванов-ю8с8г
    @АлександрИванов-ю8с8г 3 ปีที่แล้ว

    cool

  • @hugopassos4586
    @hugopassos4586 3 ปีที่แล้ว

    in pt-br, we say: incrivelmente foda
    wich means incredibly fuck!!
    thanks for share with us

  • @alsayedabdelbaqey3585
    @alsayedabdelbaqey3585 2 ปีที่แล้ว

    could you just please write the code while you are talking not copy and paste the while recording

  • @paulcullum517
    @paulcullum517 3 ปีที่แล้ว

    Emma spoon 😅

  • @anujshrestha9231
    @anujshrestha9231 3 ปีที่แล้ว

    you are explaining things too fast bro try explaining it in a detailed way and take time

  • @khanmohammedaamir8900
    @khanmohammedaamir8900 3 ปีที่แล้ว

    How to get assets image using json??

    • @mohammedaamirkhan3079
      @mohammedaamirkhan3079 3 ปีที่แล้ว

      @@HeyFlutter thanks👍👍

    • @HeyFlutter
      @HeyFlutter  2 ปีที่แล้ว +1

      Thank you, Mohammed Aamir! You could learn more about to get assets image using json here: stackoverflow.com/a/56277572