How to read local json file in flutter & show json data in listview builder

Sdílet
Vložit
  • čas přidán 29. 06. 2021
  • Was this Tutorial helpful? Spread Motivation on me by supporting paypal.me/RajatPalankar #flutter #json #flutterdev
    Hi Guys Welcome to Proto Coders Point.
    In this flutter Tutorial we will learn how to read a local json file in flutter, how to parse a json file, how to fetch data from json file and then display the json data in flutter listview builder.
    Source Code : protocoderspoint.com/read-jso...
    or
    github.com/RajatPalankar8/rea...
    productlist.json file download from here: github.com/RajatPalankar8/rea...
    Comment below for any queries 😀
    Follow and support me:
    🐦 Twitter: / rajatpalankar
    💬 Facebook: / protocoderspoint
    💸 Instagram: / protocoderspoint
    Be sure to ask for help in the comments if you need any. Suggestions for future Flutter tutorials are also very welcome! :)
    For mobile application development keep learning freely from proto coders point
    Visit: protocoderspoint.com/
    readjsondata,
    fromjson,
    rootbundle,
    loadString
    json data,
    flutter json
    json decode .
    .
    Support Proto Coders Point: www.buymeacoffee.com/rajatpal...

Komentáře • 81

  • @learningcurious5845
    @learningcurious5845 Před 2 lety +1

    well explained and worked fine with my json file thank you so much for this video. hope to see more videos like this from you.

  • @vvnavra
    @vvnavra Před 2 lety +2

    The tutorial I needed

  • @thushankalana4940
    @thushankalana4940 Před 14 dny +1

    Great Lesson.❤🙂 you are save me. This lesson was helpfull for my project.❤❤❤ Thank you so much Sir❤️❤️❤️

  • @elquenoaplica3975
    @elquenoaplica3975 Před 2 lety

    Great tutorial and explanation.
    Thanks

  • @mohammedahmed-wj8by
    @mohammedahmed-wj8by Před rokem +1

    This is the best free software Ive seen. Respect.

  • @faang29488
    @faang29488 Před 2 lety +1

    thanks man, you helped me a lot. i don't even know, where are you living, but, man, god bless you

  • @diogosequeira4873
    @diogosequeira4873 Před 3 lety +8

    Hi, good explanation and nice video.
    If I can leave a quick tip, you should pay attention to naming conventions in functions and file names, for example ReadJsonData() should be start lower case, and file name should product_data_model.
    This can encourage new flutter developers to follow good coding principles.
    Thanks!!

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 3 lety +2

      Yes you are right, Thanks for the Tip
      I will work on it and improve myself to teach beginner in better and clean way..

    • @yerraguntavijayachandrared7769
      @yerraguntavijayachandrared7769 Před 2 lety +1

      @@ProtoCodersPoint where is services.dart file??

  • @mahimeena6427
    @mahimeena6427 Před 3 lety +1

    Good Explanation Man !! Doubts got cleared .

  • @NuwanThisara
    @NuwanThisara Před 2 lety +2

    This helped me to understand the concept. thank you

  • @Mohammed-sg4tr
    @Mohammed-sg4tr Před rokem

    That's very good, thank you

  • @riku402
    @riku402 Před rokem

    thanks, this helped me

  • @nandarafi4294
    @nandarafi4294 Před 5 měsíci +1

    thanks, you are my savior, you give the source code too, god bless you man

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 5 měsíci

      You're welcome! I'm here to help with any questions you have. If you need assistance with code or have specific questions, feel free to ask!

  • @Amankumar_Raone
    @Amankumar_Raone Před rokem +1

    great video nyc explaination

  • @vinayghadigaonkar8215
    @vinayghadigaonkar8215 Před 3 lety +1

    Thank you, brother.

  • @xabibullohxalilov682
    @xabibullohxalilov682 Před 2 lety +1

    thank you broo

  • @ezimaxtech
    @ezimaxtech Před 3 lety +1

    Nice sharing

  • @rutugabani
    @rutugabani Před 4 měsíci

    thank you so much

  • @kolambiinarula9857
    @kolambiinarula9857 Před rokem

    thanks

  • @daviddzgoev9024
    @daviddzgoev9024 Před 3 lety +1

    Thanks 😊

  • @santoshsharma-ni9zo
    @santoshsharma-ni9zo Před 2 lety

    Please make a video on real api fetching ...I mean all concept on api integration

  • @aidaaqilahmohdzin5542
    @aidaaqilahmohdzin5542 Před 2 lety

    thank you, this helps me a lot. But for example, if i want to add audio, it means i can just input the link in the json file?

  • @sachinmittal65
    @sachinmittal65 Před 2 lety +2

    can we use file like product .dart instead of .json file?

  • @codinggoIndonesia
    @codinggoIndonesia Před 3 lety +1

    thank you

  • @nikhilkumarjamwal5322
    @nikhilkumarjamwal5322 Před rokem +1

    Nice Explanation.
    Can you also make a video on how to write data on json file and read it and use the data in flutter application?

  • @mdshahed5364
    @mdshahed5364 Před 2 lety

    I have question Isn't we have to call the getuser function in statstate method

  • @parfaittapsoba754
    @parfaittapsoba754 Před 2 lety +1

    Good video !
    Just improve the sound quality ...

  • @hemantchauhan6437
    @hemantchauhan6437 Před rokem

    I have used image path in place of url. will that work? .If yes then how we will write it to display

  • @gggg-no6rm
    @gggg-no6rm Před 2 lety

    if I went to press in the item and show all item details how i will doit ?????

  • @kapilpatidar1099
    @kapilpatidar1099 Před 2 lety

    i am getting error while importing "import 'package:read_json_file/ProductDataModel.dart'; ", pls guide

  • @thushankalana4940
    @thushankalana4940 Před 6 dny

    I cant load image from https get request. What is the reason for that?

  • @Aadidev7530
    @Aadidev7530 Před rokem

    Can we convert json files into photos or videos

  • @Vin_5898
    @Vin_5898 Před 2 lety +1

    thank you sir for great tutorial but I've a ques what if we create a image folder inside the assets folder and store our images then how we can get those images using json file...suppose assets/image/shoes.jpg and in the json file "image" : "assets/img/shoes.jpg"

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      Yes, you can
      I will share you the code soon

    • @Vin_5898
      @Vin_5898 Před 2 lety +1

      @@ProtoCodersPoint thank you sir

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      In this video tutorial we have json file which have imageurl to show image from internet
      instead of that you must define, in json the path of your assets folder Image like this "image": "assets/img/shoes.jpg"
      and then in Flutter Code make use of
      Image.asset(items[index].image.toString()),
      instead of NetworkImage
      That's it

    • @Vin_5898
      @Vin_5898 Před 2 lety +1

      @@ProtoCodersPoint Thank you sir it worked

    • @Vin_5898
      @Vin_5898 Před 2 lety +1

      @@ProtoCodersPoint sir i've one more ques I wanted to play audio when we tap on the one of the item in the list view using same code (title + image + audio) using json file how we can do that??

  • @aadhithiyasrivatsan
    @aadhithiyasrivatsan Před rokem +2

    Kindly tell, how to insert the same in SQFLite table... That would be great....

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před rokem

      Sure, I will create a video on same as soon as possible.

    • @aadhithiyasrivatsan
      @aadhithiyasrivatsan Před rokem +1

      @@ProtoCodersPoint thanks for the quick response.... Kindly do asap....

    • @aadhithiyasrivatsan
      @aadhithiyasrivatsan Před rokem +1

      You are the only video on internet... Who have used offline json... Glad that I found you.... Wish you all the best...

  • @faisalhukkeri6793
    @faisalhukkeri6793 Před 2 lety +1

    i have a json file for user signup
    how can i integrate it
    i dont think there's a need to make a model
    bcoz theres no need to save user info

    • @faisalhukkeri6793
      @faisalhukkeri6793 Před 2 lety +1

      I've tried few videos for past 4 days, none of them work
      and there's no video tutorial in which they are using json signup api files

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      Ok ✅ I will try to make a video tutorial asap

    • @faisalhukkeri6793
      @faisalhukkeri6793 Před 2 lety +1

      Update: I found a way to integrate it.
      Thank you for responding 🙂🤜🏼🤛🏼

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +2

      @@faisalhukkeri6793 oh that’s great 😃

  • @vishruta9761
    @vishruta9761 Před 2 lety

    what if I want a grid view instead of list view?

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety

      U can use flutter GridView
      Do you want the tutorial on gridview in flutter?

  • @krutikabaraskar4211
    @krutikabaraskar4211 Před rokem

    I'm having error on images

  • @BrYarDJ
    @BrYarDJ Před 2 lety

    nice bro how if image not url and also local ?

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      Sorry, I did not got your question
      Say again

    • @BrYarDJ
      @BrYarDJ Před 2 lety

      @@ProtoCodersPoint ok, i mean how can use image assets in place URL, i mean if i have image in assets not i have url, how can use there, How do I call the image in place url, i hope you understand, thanks

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      Use
      image.asset(‘asset image path ’)

    • @BrYarDJ
      @BrYarDJ Před 2 lety

      @@ProtoCodersPoint thanks

  • @vayugnath1358
    @vayugnath1358 Před 2 lety

    Any link to source?

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety

      Check description bro

    • @vayugnath1358
      @vayugnath1358 Před 2 lety +1

      @@ProtoCodersPoint I dont see it.. honestly. Don't mind it though. Good job with this one :) Can you make a tutorial on how to read into a json file from an app and store it, and read it back as a list or something

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety

      Check it
      protocoderspoint.com/read-json-file-assets-flutter-display-data-listview/

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety

      @@vayugnath1358 I already make a video on same concept but it's not exactly same as you requested
      Check it out czcams.com/video/ExgP_SAseN8/video.html
      Learn from this video and apply your logic
      if you are not able to do tell me
      I will soon make a video on the same

  • @mdshahed5364
    @mdshahed5364 Před 2 lety

    A lot of problem in your code

    • @ProtoCodersPoint
      @ProtoCodersPoint  Před 2 lety +1

      Share the problem you faced

    • @mdshahed5364
      @mdshahed5364 Před 2 lety +2

      it’s showing a null error "Expected a value type list datamodel but it gone type null and you have to use late keyword in the class property "

    • @JOc17KER
      @JOc17KER Před rokem

      @@mdshahed5364 i got same problem, how to solve it?