Part - 9 Flutter Get API call with Null Safety | Building List with Complex JSON using FutureBuilder

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 131

  • @thetechbrotherss
    @thetechbrotherss  2 года назад +2

    source code:
    github.com/axiftaj/Flutter-Rest-Api-Tutorials-With-Example
    do give a start if it helped.

  • @syedshabbarraza6384
    @syedshabbarraza6384 3 месяца назад +1

    Sir kisi sy bhi itni achi samajh nahi aye API ki jitni aap sy aye hai
    JAZAKAllah sir Bohot shukriya

  • @poetryiscodingdecoding7965
    @poetryiscodingdecoding7965 Год назад

    Never thought I would work on API's ..but when you get a good teacher....everything is so crystalline clear. Sir, keep on bringing more stuff with more projects.

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      Glad to hear that, bro do subscribe and share with your friends

  • @codewithihsan2182
    @codewithihsan2182 2 года назад +2

    Thank You Sir as Always Keep it Up waiting for ChatApp from Scratch like this
    your explanation Method is Superb

  • @YashKhare-m5d
    @YashKhare-m5d 8 месяцев назад

    Must watch video for freshers.. Great going brother 😀

  • @mafiyaking0888
    @mafiyaking0888 Месяц назад

    Great work brother keep it up full support to you brother

  • @Saansh6462
    @Saansh6462 2 года назад +1

    very very useful video at all... .thanks a lot.

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      You are most welcome, do like and share with your friends

  • @yashmistry9635
    @yashmistry9635 2 года назад +2

    Sir can you make a video on what is model and why it is used and making model of complex and without complex object of an API but without using this plugin
    It will be much helpful for me sir to understand how things works

  • @basitali8309
    @basitali8309 2 года назад +1

    Great work.! Thank You Taj bhai. Really Enjoyed.

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      Glad it helped, please share with your friends so most can make most out of it.

  • @sadiaakterafrin7522
    @sadiaakterafrin7522 2 года назад

    great initiative sir... keep making videos for begginers like me

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      Thank you, i will post more content in future.

  • @muhammadshahzebsulemani4365
    @muhammadshahzebsulemani4365 2 года назад +1

    Very amazing and Interesting Video Sir!

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      Thank you do subscribe and share with your friends.

  • @MuhammadASIF-wu5sk
    @MuhammadASIF-wu5sk 2 года назад +2

    It shows te following error. When i use Usermodel. Fromjson(i) ;
    In for loop.
    Error.
    The argument type

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      Its not error it’s pretty much clear your model has different variables go and change it to dynamic

    • @shahabuddin-pc8jr
      @shahabuddin-pc8jr Год назад

      i also facing this ,,how u resolved this?

  • @test-yu2vn
    @test-yu2vn 9 месяцев назад

    HI thank you very much for this video, can plz make a video on listing of items with pagination while scrolling down

  • @imdadullah9093
    @imdadullah9093 2 года назад +2

    Text(snapshot.data![index].address!.city.toString()), sir what is this ! sign used for for null safety we use string?

  • @harisyounus921
    @harisyounus921 2 года назад +1

    great work sir

  • @mazharnadeem8358
    @mazharnadeem8358 2 года назад +1

    awesome explaination..

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      Thank you do subscribe and share with your friends.

  • @takirajani2693
    @takirajani2693 2 года назад +1

    Very good video..i liked this video and subscribe the channel.

  • @rana_adnan218
    @rana_adnan218 Год назад

    very helpful Sir

  • @areebafarooq2694
    @areebafarooq2694 2 года назад +1

    if we have a json response start with curly brackets { response:1, code: 200, data: { "id":1, "name": areeba}} like this ... still would this be consider as a list???

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      ni array [ ] in symbol sy represent hoti ha r array he list hoti ha, please ma phr recommend krun ga ap basic json structure wali video dekhain r usko smhhain warna ap simple c api par bhi struggle karin ge

    • @areebafarooq2694
      @areebafarooq2694 2 года назад

      @@thetechbrotherss ok ok Thankyou

  • @muhammadwaseem8731
    @muhammadwaseem8731 2 года назад +1

    Sir ya is ma adress wali complete body ko kesy show krwaingy?
    Jesy street , city, zipcode or suite jo address ki body hy isko hum 1 he dfa ma address ko mention krein or osmy city etc sb show ho jay?

  • @demodemo9429
    @demodemo9429 2 года назад

    Tq for making this video bro 🙏🙏😇😇😇😇😇

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      Thank you do subscribe and share with your friends.

    • @demodemo9429
      @demodemo9429 2 года назад

      @@thetechbrotherss ofcourse bro 😃

  • @shahabuddin-pc8jr
    @shahabuddin-pc8jr Год назад +1

    sir g error di raha hae UserModel.fromjson yaha pi from json bilkul nahi ly raha hae,4 bar model ko dobara create kia or github si ap ka model b copy kia phir b nahi ho raha hae

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      Please follow with me carefully you must be doing something wrong or always comment the error for exact answer

  • @freelancermunim-eq4wm
    @freelancermunim-eq4wm 6 месяцев назад

    Sir I have a question...why did we use snapshot.data[index].data.title.toString() whereas we have used post[index].title.toString() for the same API in the previous video? and Thank you for the tutorial...respect from Bangladesh

    • @thetechbrotherss
      @thetechbrotherss  6 месяцев назад

      To be honest i don't remember now, i created this video long ago, but i must have explain this in the whole playlist

    • @syedshabbarraza6384
      @syedshabbarraza6384 3 месяца назад

      I think both methods are identical and working same the difference only was previously we was first storing data to list them fetching and displaying directly from list
      But now we are just changed the path of fetching
      It just thing that I understand may be right may be wrong 🤷

  • @test-yu2vn
    @test-yu2vn 9 месяцев назад

    Hi thank you very much for this video, i am getting error "The argument type 'Map' can't be assigned to the parameter type 'Map'." at getUserApi() function where 'userList.add(UserModel.fromJson(i));' can plz give suggest any thing

  • @abhaymaurya8116
    @abhaymaurya8116 2 года назад

    Awesome Bro...

  • @Yadnesh_
    @Yadnesh_ 11 месяцев назад

    Bro I am working on a project where I am getting an status video of 429 , where I have the function in that I have for loop in that I have try,catch .
    In try block I am calling the 3 api of same server but it gives me 429 status code error how to fix. It

    • @thetechbrotherss
      @thetechbrotherss  11 месяцев назад +1

      bro this is an error from server side, only backend developer can fix

    • @Yadnesh_
      @Yadnesh_ 11 месяцев назад

      @@thetechbrotherss the api has rate limit 2 per second, the first 2 api hits successful,but it gives error for last . I tried using future delay for 1-10 second but nothing worked,

  • @S4eedKhan
    @S4eedKhan 3 месяца назад

    Sir can you please tell me that why we used async snapshot at 11:56 because in previous two tutorials we didnt used it

    • @thetechbrotherss
      @thetechbrotherss  3 месяца назад +1

      even if we didn't used it it's an async because it's future

    • @S4eedKhan
      @S4eedKhan 3 месяца назад

      @@thetechbrotherss ok sir

  • @InspirationForLifeOfficials
    @InspirationForLifeOfficials Год назад +1

    Hello Sir,
    I'm practicing the same code, but found lot of errors, like.
    Aik jo JSONtoDart UserModel create kiya wo aik b bijaye 3 additional b generate hogaye khud he.
    1. address.dart
    2. Company.dart
    3. Geo.dart
    Inhi 3no files mai errors a arahy. like.
    Address.fromJson(dynamic json) {
    jab address pr focus kro to error ata (Non-nullable instance field 'city' must be initialized)
    isi tarah in k sath required missing ka error ata jab k ap k pass aisa kuch nahi araha tha.
    Address({
    this.street,
    this.suite,
    this.city,
    this.zipcode,
    this.geo,});
    sir please guide

  • @abhaymaurya8116
    @abhaymaurya8116 2 года назад

    Plugin ke liye bhi thanks ...

  • @asfarkhattakvlogs1108
    @asfarkhattakvlogs1108 2 года назад

    Hello asif bhaie , app api k through jab data get karte hien ,our for loop k andher map k sath i lagate hien . Us i ka actual work kia hie , muje i pe eroor ata hie bas .jis ki waja se mn data get nhi kar pa raha.
    For( map i in data ) there..

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      Yeah loop chalta ha to store data in list r phr hm list ko show krwaty ha front end par

    • @asfarkhattakvlogs1108
      @asfarkhattakvlogs1108 2 года назад

      @@thetechbrotherss sir app quran api pe 1 video bana sakte hien plzz , jis me different apis use howe hote hien like for surahs ,ayahs and parahs

  • @MuslimUmmat
    @MuslimUmmat Год назад

    Asif bhai mera yeh perform hora hai 'CircularProgressIndicator(); ' laikin iskai baad white screen hai or name ,address user id nahi perform hore hain

    • @thetechbrotherss
      @thetechbrotherss  Год назад +1

      Chek api response in postman then check in your app and print snapshots for debugging

    • @MuslimUmmat
      @MuslimUmmat Год назад

      @@thetechbrotherss jazak Allah done

  • @gamesden8021
    @gamesden8021 5 месяцев назад

    Sir agr array ka name nahi ho or uska inner ma objects ka keys same ho all objects ma tu model srif aik hi object ka Bana ga or agr same array case ho laikin objects ma nested object ajai tu bhi model first object ka Bana ga plzz answer me

  • @codeandtraveling796
    @codeandtraveling796 2 года назад +1

    Sir ap se ek request thi sir jo user wali api ap ne yaha call ki he is api ka ap modal per ek video banade pata to chale asi api ka agr khud modal banana hua to kase banayge without plugin please

  • @UsmanNawaz-pq4sj
    @UsmanNawaz-pq4sj Год назад

    Salam sir ham na yaha par future builder ma Asyncsnapshot

  • @mr.mateen
    @mr.mateen 2 года назад +1

    I do the same but I don't know why maine jo list create ki hai wo 4 times repeat ho rahi hai

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +2

      Do clear the list when you before fetching it

    • @mr.mateen
      @mr.mateen 2 года назад

      @@thetechbrotherss Thank you man I got it.

  • @rana_adnan218
    @rana_adnan218 Год назад

    bro ham local server say data fetch kis trah ker sakty ha eg. koi hosting ya ham khud kay computer ko online rakh kar data ko apis kay throw apni app may show kerwa sakty ha?
    like a movie app.

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      local k liye koi local database bna lain

    • @rana_adnan218
      @rana_adnan218 Год назад

      @@thetechbrotherss bro wo kasy bnta ha koi hint da dy

  • @taimoormanzoor7386
    @taimoormanzoor7386 2 года назад +2

    Sir, can you tell me what does mean of null safety?

    • @thetechbrotherss
      @thetechbrotherss  2 года назад +1

      Means data cannot be null

    • @asangborkar6210
      @asangborkar6210 2 года назад

      To make sure we should get a null error we put a value which used when the data is not available

  • @Hamza-dw4iw
    @Hamza-dw4iw Год назад

    why did we create our own model in previous video when we can do this way.

    • @thetechbrotherss
      @thetechbrotherss  Год назад +2

      your must know all the methods, it helps you keep going

  • @sameerali9613
    @sameerali9613 2 года назад +1

    ❣❤❤

  • @EbukaChikodi-ey3hi
    @EbukaChikodi-ey3hi 11 месяцев назад

    I wish you had English subtitles

  • @auliyasstory8316
    @auliyasstory8316 Год назад

    Assalam Oalikom Sir Agar start object { } sy ho raha tu kasy get kary gy api ko

  • @narayanpaswan6558
    @narayanpaswan6558 2 года назад

    Sir agar paginate kiya huwa api aa raha ho. to usse kaise flutter me bind kare?

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      Hello please follow this blog and you have your problem solved.
      www.kindacode.com/article/flutter-listview-pagination-load-more/

  • @auliyasstory8316
    @auliyasstory8316 Год назад

    assalam Oalikom sir
    hum har api ko class ka andar define kar sakty hy ka nahi???

  • @g4gamer330
    @g4gamer330 2 года назад +1

    sir agar plugin kam na kara phair ham kia kara ga

  • @tapForSkyyy
    @tapForSkyyy Год назад

    Agar Api response object k sath ho to kya karni chahiye?

    • @thetechbrotherss
      @thetechbrotherss  Год назад +1

      watch next videos you will get the answers. Then you don't need the list just create model directly.

    • @tapForSkyyy
      @tapForSkyyy Год назад

      @thetechbrotherss Okay, btw the video seems clear with your explanation. Thank you so much for it!

  • @somnathdas8922
    @somnathdas8922 2 года назад +1

    ❤️💕🙏

  • @muhammadrizwanshafiq5409
    @muhammadrizwanshafiq5409 2 года назад +2

    how would you get the api data that is like:
    {
    "work_experiance": [
    {
    "id": "111",
    "organization": "GEEEEE",
    "designation": "Mobile Application Developer",
    "duration": "2021-Jan to Present",
    "from_exp": "2021-Jan",
    "to_exp": "Present",
    "description": "Mobile Application Development"
    }
    ],
    "skills": [
    {
    "stdcode": "022",
    "skills": "Programming",
    "id": "453",
    "created_on": "2022-01-08 11:42:06",
    "created_by": null,
    "updated_on": "2022-01-08 11:42:06",
    "updated_by": null
    },
    {
    "stdcode": "022",
    "skills": "Mathematics",
    "id": "454",
    "created_on": "2022-01-08 11:42:06",
    "created_by": null,
    "updated_on": "2022-01-08 11:42:06",
    "updated_by": null
    },
    {
    "stdcode": "022-",
    "skills": "Data Analysis",
    "id": "455",
    "created_on": "2022-01-08 11:42:06",
    "created_by": null,
    "updated_on": "2022-01-08 11:42:06",
    "updated_by": null
    }
    ]
    }

    • @thetechbrotherss
      @thetechbrotherss  2 года назад

      Its very easy watch part 11 and tutorial without model fetch api

    • @muhammadrizwanshafiq5409
      @muhammadrizwanshafiq5409 2 года назад +1

      @@thetechbrotherss thanks alot, you are such a life savior bro

  • @pankajkhairnar621
    @pankajkhairnar621 Год назад

    Bhai, is vale video me , har line pe typing mistake ho rahi hai...

  • @Arjuns_World
    @Arjuns_World Год назад

    What if objects were different at different index

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      It doesn’t matter if you understand the json structure

    • @Arjuns_World
      @Arjuns_World Год назад

      @@thetechbrotherss but how will we access it in a list of the object names are different in every index

    • @Arjuns_World
      @Arjuns_World Год назад

      I will connect with you on LinkedIn for details

    • @Arjuns_World
      @Arjuns_World Год назад

      @@thetechbrotherss I am getting this kind of response "top_brands": {
      "PEX or Misc": {
      "image": "/brand-logo/brands/pex-or-misc.png",
      "count": 11214
      },
      "Baldwin": {
      "image": "/brand-logo/brands/baldwin.png",
      "count": 3070
      },
      "Kohler": {
      "image": "/brand-logo/brands/kohler-.png",
      "count": 2006
      },
      "Hansgrohe": {
      "image": "/brand-logo/brands/hansgrohe.png",
      "count": 1622
      },
      "Nibco": {
      "image": "/brand-logo/brands/nibco.png",
      "count": 1538
      },
      "Duravit": {
      "image": "/brand-logo/brands/duravit.png",
      "count": 1393
      },
      "American Standard": {
      "image": "/brand-logo/brands/american-standard.png",
      "count": 1375
      },
      "Graff": {
      "image": "/brand-logo/brands/graff.png",
      "count": 1338
      },
      "Delta": {
      "image": "/brand-logo/brands/delta.png",
      "count": 1116
      },
      "Toto": {
      "image": "/brand-logo/brands/toto.png",
      "count": 1031
      }
      }
      },
      {
      "vendor_name": "Zoro",
      "total_products": 6545,
      "total_brands": 139,
      "top_brands": {
      "Kohler": {
      "image": "/brand-logo/brands/kohler-.png",
      "count": 483
      },
      "Delta": {
      "image": "/brand-logo/brands/delta.png",
      "count": 476
      },
      "Toto": {
      "image": "/brand-logo/brands/toto.png",
      "count": 438
      },
      "Newport Brass": {
      "image": "/brand-logo/brands/newport-brass.png",
      "count": 435
      },
      "American Standard": {
      "image": "/brand-logo/brands/american-standard.png",
      "count": 381
      },
      "Blanco": {
      "image": "/brand-logo/brands/blanco.png",
      "count": 356
      },

    • @Arjuns_World
      @Arjuns_World Год назад

      how do I make a list of Image of brands

  • @auliyasstory8316
    @auliyasstory8316 Год назад

    mtlb without creating models

  • @affiliatemarking.347
    @affiliatemarking.347 Год назад

    make more video

  • @RoshniDevi-wj1eo
    @RoshniDevi-wj1eo Год назад

    Don't work steps😢

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      Please follow playlist from start for better understanding

  • @ShadabKhan-ib7me
    @ShadabKhan-ib7me Год назад +1

  • @khabibali4967
    @khabibali4967 Год назад

    when i try to create user model, it create 3 models extra like website, address, company what I do. I delete and built it again but same issue facing.

    • @thetechbrotherss
      @thetechbrotherss  Год назад

      I didn't understood

    • @MdSamimTech
      @MdSamimTech Год назад

      If you are using Android studio extension then just change some settings of that extension while creating JSON TO DART.

    • @MdSamimTech
      @MdSamimTech Год назад

      ​@@thetechbrothersshe is telling that after he creates any model with the extension the classes are automatically created in a separate file ,