You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Efra Espada edited this page Jan 30, 2024
·
2 revisions
Define Dart classes that you want to serialize or deserialize. Annotate these classes with the necessary annotations from the generated file from the object package to specify serialization behavior.
sample.dart in model/ folder
import'generated/model.g.dart';
classSampleextendsSampleGen {
@override@Field(
name:'id',
primary:true,
)
String id ='';
@override@Field(name:'numberContent')
num numberContent =0;
Sample();
}
Generate Serialization Code
Run the object builder to generate serialization code for your annotated Dart classes.