Enumerations in Dart - Learn About Enums and Enhanced Enums in Dart

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

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

  • @muhammadzimmad1995
    @muhammadzimmad1995 Год назад +4

    While watching RriverPod tutorial, I saw you have used this enhanced enums. That were strange to me, so I searched it on RUclips and found this. This is amazing and well explained.

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

    I didn't knew I could use enum in so many different ways, time to improve the codebase. Thanks Vandad!

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

      I’m glad you find this useful 😊

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

    I greatly appreciate the informative video you shared. The inclusion of multiple examples was particularly helpful. While I understand the criticisms of enhanced enums, I personally believe that they offer a valuable level of type safety. I am also hopeful for future improvements in this area. Could you please explain the specific benefits of dynamically instantiating enums as demonstrated in Swift?
    (I would also like to mention that, in my experience, enums in TypeScript are not as well-implemented.)

  • @StudentPro-io8vi
    @StudentPro-io8vi Год назад +1

    Keep going Vandad! TY!

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

    Amazing sir

  • @flagger1
    @flagger1 День назад

    I'm sorry, but I find that these Dart Enhanced Enums fundamentally make more sense than the Swift Enums you demonstrated
    Fundamentally, enums should be hard coded. The swift enums you showed are basically doing exactly what you can do with a class
    There's a reason why Enums exist and Dart Enums are more true to that compared to the others
    I could be wrong, but I've used these, and watching you teach me more about them makes them even more interesting
    I could be missing something about the Swift Enums, but from that example you made, they're basically just classes.
    What I'm trying to say is, isn't the whole point of enums for them to be fixed values?? So, dynamic assignment of values kinda defeats the whole purpose.
    Other than that, great course, sir

  • @houssembousmaha3615
    @houssembousmaha3615 Год назад +4

    "Or as i would like to call it : uninhanced enum 😂😂😂😂😂😂"

  • @AshishKumar-ft6wv
    @AshishKumar-ft6wv Год назад

    Dart team should watch your videos😅

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

    I learned a lot! Thanks @VandadNP