Creating models
It is hard to think of a mobile app that doesn’t need to communicate with a web server or easily store structured data at some point. When making network-connected apps, the chances are that it needs to consume some good old JSON, sooner or later.
In case you're not familiar with the term data class, it's simply a class with value equality, copyWith
method, its fields are immutable and it usually easily supports serialization. Also, if you're familiar with Kotlin, you know that you can heavily cut down on the boilerplate by defining fields directly in the constructor like this:
instead of this
instead of coding boilerplate freezed does all this with a few keystrokes
In this section we will be Working on Creating the models of the Products features and the following will be covered.
Last updated