Top 16 Dart Tips and Tricks Every Flutter Developer Should Know

Поделиться
HTML-код
  • Опубликовано: 12 июн 2024
  • Written tutorial here: 👇👇
    codewithandrea.com/videos/top...
    In this tutorial I share 16 Dart top tips that will improve your coding style as a Flutter developer.
    You can use them to write more concise and effective code, and make the most of the Dart language.
    CONTENTS
    00:00 - Intro
    00:22 - 1. Dart supports string multiplication.
    01:03 - 2. Use Future.wait to execute multiple Futures concurrently
    01:32 - 3. Dart callable classes
    01:57 - 4. How to invoke nullable callbacks
    02:33 - 5. Using anonymous functions and functions as arguments
    03:36 - 6. You can use collection-if and spreads with lists, sets AND maps
    04:06 - 7. Iterating through a map in a null-safe manner?
    04:36 - 8. Use named constructors and initializer lists for more ergonomic APIs.
    05:16 - 9. Getters and setters
    05:51 - 10. Use underscores for unused function arguments
    06:16 - 11. Singletons and private constructors
    06:58 - 12. Need a collection of unique items? Use a Set rather than a List.
    07:42 - 13. How to use try, on, catch, rethrow, finally
    08:27 - 14. Common Future constructors
    09:05 - 15. Common Stream constructors
    09:57 - 16. Sync and Async Generators
    10:46 - Wrap Up
    Complete Dart Course (with discounted price): nnbd.me/dart
    Join my FREE email course to become a Flutter expert with the best resources, at your own pace: codewithandrea.com/newsletter/
    Happy coding!
  • НаукаНаука

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

  • @ethan-youtubetips4325
    @ethan-youtubetips4325 3 года назад +17

    You got me watching the whole video. Thumbs up 👍

  • @RetroPortalStudio
    @RetroPortalStudio 3 года назад +29

    This is a gem 💙💎

    • @CodeWithAndrea
      @CodeWithAndrea  3 года назад +5

      Thanks a lot. I’m a fan of your channel, so it’s great to hear this.

    • @skarrin6207
      @skarrin6207 3 года назад

      Oh hi paras

  • @rayanfernandes2631
    @rayanfernandes2631 3 года назад +9

    Woah man that was pretty good and consise demonstration of dart ... I learnt a lot of good stuff today!

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

    This is amazing! They are all very useful. 6 of them where at least partially new to me.

  • @workflop4117
    @workflop4117 3 года назад +2

    Thanks for sharing Andrea

  • @DenzilFerreira
    @DenzilFerreira 3 года назад +5

    This is a masterpiece!

  • @denzell5070
    @denzell5070 3 года назад

    Thank you. I'm definitely purchasing the course.

  • @nicolasdupere
    @nicolasdupere 3 года назад

    So, so good! Thanks!

  • @jjsebastianfuertes
    @jjsebastianfuertes 3 года назад +2

    Great content! 💯

  • @yogenp
    @yogenp 3 года назад

    Love this. Awesome content.

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

    Thanks for sharing!

  • @mrunfunny
    @mrunfunny 3 года назад

    Great Video. Keep it up Andrea.

  • @alexey5174
    @alexey5174 3 года назад

    Useful, thanks!

  • @bm830810
    @bm830810 3 года назад

    great tips, many thanks

  • @raul286162
    @raul286162 3 года назад

    This information is gold ❣️

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

    Awesome!

  • @delikinVlogs
    @delikinVlogs 3 года назад

    GOLD!!! THIS IS GOLD!!!

  • @Fanaro
    @Fanaro 3 года назад +1

    The chaptering really helps. 👍

  • @vibinu7589
    @vibinu7589 3 года назад

    Best flutter channel in RUclips!🤩

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

    Very informative video!

  • @yottatube
    @yottatube 3 года назад

    Excellent! 👍

  • @MisterNorthernCanuck
    @MisterNorthernCanuck 3 года назад

    Absolute gold.

  • @rizalhadiyansah
    @rizalhadiyansah 3 года назад

    Coooool!!!! Thanks!!!'❤

  • @abdelouahedmedjoudja2163
    @abdelouahedmedjoudja2163 3 года назад

    Great video thanks

  • @yearsystem882
    @yearsystem882 3 года назад

    thanks for the video brother :)

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

    nice ... very informative

  • @mr.thorcoder150
    @mr.thorcoder150 3 года назад

    Professional 🔥

  • @fahadkhatri4318
    @fahadkhatri4318 3 года назад

    Excellent 👍 👍 👍

  • @johncerpa3782
    @johncerpa3782 3 года назад

    Great tips

  • @shakilmakram6923
    @shakilmakram6923 3 года назад

    thanks for the tips

  • @sureshchakma1145
    @sureshchakma1145 3 года назад

    I bought your dart course from Udemy... and i am practicing... thanks you

  • @whilelive
    @whilelive 3 года назад

    Amazing

  • @ahmedadnan5875
    @ahmedadnan5875 3 года назад

    awesome

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

    great

  • @guilhermeaguiar2743
    @guilhermeaguiar2743 3 года назад +1

    Sou do brasil nao sei falar ingles, mas meu parabens. Deu para entender algumas coisas

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

    What a coincidence I just had to show data from the map in UI and I was spitting each entry manually suddenly map iteration part comes and I used it instead Thank You, Creator.

  • @MikeNugget
    @MikeNugget 3 года назад +1

    Nice video!
    What shortcut do you use in VS Code to quick import files from the same directory?

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

      I guess he is just pressing the Undo shortcut to show the code he is explaining.

  • @void4904
    @void4904 3 года назад

    Like first 💓

  • @3mro_coding
    @3mro_coding 3 года назад +1

    Did you show ur localhost as https how? Adding self signed ssl? To the vhost?

  • @_chappie_
    @_chappie_ 3 года назад

    I knew about some of these and I felt less newbie lop

  • @hemanth6951
    @hemanth6951 3 года назад

    1:50 same thing in python __call__ method,👍

  • @mehmetedex
    @mehmetedex 3 года назад

    cool

  • @techhublearn1
    @techhublearn1 3 года назад

    Hi Andrea sir can you suggest some interesting college project using flutter.

  • @LinJheYi
    @LinJheYi 3 года назад +3

    Unfortunately Tip #2 is wrong, Future.wait didn't run Futures concurrently, it just run them sequentially in current isolate/event loop, and give you all result after every Future is finished. If you want real concurrency, you should spawn new isolates.
    For example:
    void main() async {
    await Future.wait([
    Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
    Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
    Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
    ]);
    }
    It'll print 1,2,3,4,5,1,2,3,4,5,1,2,3,4,5, instead of 1,1,1,2,2,2....

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

      Thanks for informing!

  • @theradinion6317
    @theradinion6317 3 года назад +1

    thought this was about the sport

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

    plz build a little vpn plz

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

    .

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

    It was too fast. I could not understand few of them.

  • @antonyaz3506
    @antonyaz3506 7 месяцев назад

    One year of my experience in 12 minutes