ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Async, Await, and Future Keywords in Flutter | Dart | Asynchronous Programming | Hindi

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ส.ค. 2022
  • Async, await, and Future are keywords that are used in Dart and Flutter to support asynchronous programming.
    Async: The async keyword is used to mark a function as asynchronous. An asynchronous function is a function that can perform a long-running operation without blocking the execution of the program. When an asynchronous function is called, it returns a Future object that represents the eventual result of the function.
    Await: The await keyword is used to pause the execution of an asynchronous function until a Future completes. When an asynchronous function is called with the await keyword, the function will pause at that point and wait for the Future to complete before continuing. This allows you to write asynchronous code that looks and behaves like synchronous code, making it easier to read and understand.
    Future: The Future class is a core class in Dart that represents a value that may not be available yet. A Future can be used to represent the result of an asynchronous operation, and can be used with the await keyword to pause the execution of a function until the Future completes.
    My TH-cam Gear:
    Boya BYM1(Mic): amzn.to/3bvm69j
    Redmi Note 7 Pro(Mic & Camera): amzn.to/3uRkVsb
    MSI Motherboard: amzn.to/3fiQHYO
    Intel i3 Processor: amzn.to/3w8TWbQ
    Mouse: amzn.to/3yb8PMP
    Keyboard: amzn.to/3bvmtkd
    Wifi Adaptor: amzn.to/3fiQYuO
    SSD: amzn.to/3w2w2Pa
    Speakers: amzn.to/3w6pKhv
    Instagram: / ahirlog
    Facebook: / ahirlog
    Twitter: / ahirlog
    TH-cam: / ahirlog
    #ahirlog #flutter #dart
    Last Summer by Ikson: / ikson​
    Music promoted by Audio Library • Last Summer - Ikson (N...

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

  • @prabinlamsal74
    @prabinlamsal74 ปีที่แล้ว +7

    Dear beginners in dart and flutter,
    The example shown in this video doesn't exactly depict how async and await usually work in flutter.
    void main() async{
    print ('"line 1');
    await fetchData();
    print ('"line 2);
    }
    Future fetchData() async{
    Future.delayed(Duration(seconds:5), ()=> print("line 2"));
    }
    Yes, in this case, the output will be as shown in the video. But this is a really rare senario where the fetchData() function doesn't return anything. If the return keyword is used, then the order of execution will be totally different.The await keyword makes the code below it wait for its execution. That way of execution is generally the normal workflow of asynchronous progamming and this is just a special case where the workflow is quite different.
    So, please read a separate blog/video about asynchronous programming in dart after watching this video.

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

      thank you

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

    thanks for the explanation i have used the method but didnt know exact things till today.... helpful for me

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

    Hy I tried this program by my self and I notice that when I didn't use async , future , await in code still I was getting same result why is that.line 1 and Line 3 was executing before and then l2

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

    dear you are really great teacher because your explain way is easy to understood. "thanks" and if possible to create interviews play list ....

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

      I will create a video on this

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

    Nice video thankyou 🙏🏼🙏🏼🙏🏼

  • @user-le2ku4my8h
    @user-le2ku4my8h 10 หลายเดือนก่อน

    Nice explanation❤

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

    U r back 🔥

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

    dear you are great teacher.thank you bhai and next videos is getext
    stat management

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

      Very soon

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

    great video .

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

      Thanks!

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

    thank you

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

    great video

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

    Dart Tutorials ke sabhi baki videos jaldi upload kro sir

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

    bro ap dart ki website sa dekha kar line by line with explaination kar ka vedio banaiyn in hindi 🙏🙏🙏🙏

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

    Bhai ye wrong hai jo btaya hai aise nhi chlata ye.

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

    Dart series chahiye sir

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

      Already uploaded, check out the dart playlist

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

    Firebase se data lena sikao

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

    Sir please SqlLite shuru kijiye sir please please please sir 😇

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

      I will make

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

    Thank you

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

    Rest Api