Flutter beginners tutorial: Make HTTP requests to a REST API. Fetch data from the network.

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

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

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

    A good flutter teacher on RUclips said about the letter. I have never seen a video like this anywhere. All my doubt have been cleared in one video. Thanks to you.

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

      Glad it was helpful! Stay connected.

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

    Great video! Your explanation was just what I needed, and you went into meticulous detail to make sure I understood everything. Thanks for sharing your expertise!

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

      Glad you liked it! Welcome to the channel, Stay connected.

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

    Very helpful video short and very detailed. I will say thank you again because this is the best I have seen so far

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

    good job thanks you from Senegal Africa

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

    Excelente Explicação CRUD REST API......Parabéns

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

    great video.Problem solved in a single video

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

    You did good with this video

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

      Thank you very much. I am trying to do better, stay connected.

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

    Thanks so much, I have got to understand very well. Besides, my post_list page showed the circular progress indicator and not the data. I tried catching the error, but it seems everything is working fine. What do you suggest?

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

      Hi if you are still having the error, then check whether you are returning the appropriate widget from the builder function when data is available.
      Sorry for the delay in responding. Stay connected.

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

    in the Post Details page, you passed "post" into EditPost page at 32.29 timeline, how did you identify it within that context? mine is showing unidentified post

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

      Let me check

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

      This is a valid confusion; I am sorry for that.
      Declare the "Map post" above the build function ---
      late Map post;
      @override
      Widget build(BuildContext context) {}
      Inside the builder function of the FutureBuilder , once you get the data assign it to the variable post
      if (snapshot.hasData) {
      post = snapshot.data!;
      .....}
      Take a look at relate source code on the link below:
      github.com/gitanjal/flutter_http_basics/blob/master/lib/screens/post_details.dart

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

      @@droidmonk4820 working now. thanks alot!

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

    Excellent video 😊

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

    i have an error
    _CastError (type '_InternalLinkedHashMap' is not a subtype of type 'List' in type cast)

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

      Most probably you are getting this while trying to fetch the details of one post, right! (may be at snapshot.data).
      Meaning: You are trying to put an instance of Map in a List.
      Solution: Try changing the type of the variable(Where you want to put the result) to a map.

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

    Superb brother. Can you do the same with help of GetX library?

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

    How to do this with a data model?
    Thanks for the video

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

      You'll need to parse the json and create the instance of the model.
      Have you tried anything?

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

      @@droidmonk4820 Yes i did one page and I was successful showing all the users but I wanted to do it for one user by using thier user ID and I could not do it.

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

    I am getting the error 'The method 'jasonDecode' isnt defined for the typre 'HTTPHelper'.

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

      Add the line below at the top of the file containing the HTTPHelper class.
      import 'dart:convert';
      The method jsonDecode belongs to the library dart:convert . Thus you must import the library to be able to access it.

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

      I fixed it... changed Import 'dart:convert' to Import "dart:convert' as cnv then changed items = cnv.jasonDecode(jasonString)

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

    thanks sir

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

    Can you make a playlist for restapi flutter bro❤

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

    hii, i am getting error that is '_InternalLinkedHashMap' is not a subtype of type 'List', i am trying to fetch data from twelve data api, plese help

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

      Most probably you are getting this while trying to fetch the details of one post, right! (may be at snapshot.data).
      Meaning: You are trying to put an instance of Map in a List.
      Solution: Try changing the type of the variable(Where you want to put the result) to a map.

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

      @@droidmonk4820 i am sorry, the code workd fine, i made mistake while fetching data from api

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

      No worries. Stay connected.

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

    good teacher

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

    If i would can get more one like this video i would do this

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

      Thanks for commenting, I hope the video was helpful to you. Stay connected.

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

    thank you

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

    nice

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

      Glad you liked it. Stay connected.

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

    how i contact you sir...please reply to me....

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

      Let's connect on LinkedIn
      www.linkedin.com/in/gitanjal