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
Result {
final int? code; final String?
final DataType? data; final String?
final String? msg;
}
So I want all generated Models to inherit from some abstract so that I can easily access the code and msg attributes in order to handle error messages consistently.
Describe the solution you'd like
I want to be able to pass in a path in build.yaml via base_model, e.g. lib/template/base_model.dart. base_model.dart defines a class of the same name
abstract class BaseModel {
int? code;
String? msg;
}
Then all generated Models inherit from this class, so I can process all request results uniformly regardless of their type!
The text was updated successfully, but these errors were encountered:
All of my server's return structures are
So I want all generated Models to inherit from some abstract so that I can easily access the code and msg attributes in order to handle error messages consistently.
Describe the solution you'd like
I want to be able to pass in a path in build.yaml via base_model, e.g. lib/template/base_model.dart. base_model.dart defines a class of the same name
Then all generated Models inherit from this class, so I can process all request results uniformly regardless of their type!
The text was updated successfully, but these errors were encountered: