Hacker News new | ask | show | jobs
by suddenexample 512 days ago
I might be missing something here, don't records already exist? https://dart.dev/language/records
1 comments

They exist but they're still missing a lot of things you'd want in a data class like copyWith, serialization etc.

In practice in a Dart app you usually use freezed or something similar: https://pub.dev/packages/freezed