Flutter / Dart macros details explained - JsonCodable

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024

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

  • @r.i.c.o9820
    @r.i.c.o9820 23 วันที่ผ่านมา +2

    They use import prefixes (such as prefix0) in generated code to avoid collisions in class names. So if you declare your own class called String, it wouldn't cause conflicts with dart core library because they will have different prefixes

    • @imaNNeO
      @imaNNeO  21 วันที่ผ่านมา

      Nice! Thanks for sharing your valuable knowledge.

  • @user-cl8dv4xc7t
    @user-cl8dv4xc7t หลายเดือนก่อน +2

    "Wow, this Flutter tutorial is amazing! 🥳 The explanations are super clear, and the examples make it so much easier to understand.

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

      I'm super happy that you liked it!
      If you want to motivate me, you can share the channel with your friends!
      Cheers!

    • @user-cl8dv4xc7t
      @user-cl8dv4xc7t หลายเดือนก่อน +1

      @@imaNNeO I’ll definitely do it.

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

    The best thing is that when macros are fully released, Flutter and dart is going to be changed a lot for the better.

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

      Yes, that's a revolution in Dart and Flutter.

  • @munawerali8045
    @munawerali8045 3 หลายเดือนก่อน +2

    so if i want to access empty or copywith functions so, what can I do?

    • @imaNNeO
      @imaNNeO  2 หลายเดือนก่อน

      You can use data_class package that uses macros:
      github.com/felangel/data_class

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

    Hope riverpod and freeze package can change to macro, It was so annoying to generate file😢

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

      Felix is working on data classes, so I think we don't need to use freeze anymore. Check it out here:
      github.com/felangel/data_class

    • @TekExplorer
      @TekExplorer 2 หลายเดือนก่อน

      Freezed is itself being worked on for macro support as well. Notice that remi published a build as the dataclass package

    • @whity2508
      @whity2508 2 หลายเดือนก่อน

      @@TekExplorer how about riverpod?