Model constructor

Model(
  1. Map<String, dynamic> data
)

Model Constructor

Implementation

Model(Map<String, dynamic> data) : super(data) {
  if (!data.containsKey("id")) {
    throw UnsupportedError("Model Requires Field :id");
  }
  this._id = Field.getString(data["id"], "");

  if (this._id!.isEmpty) {
    throw UnsupportedError("Model Requires Field :id");
  }
}