BaseEntityDataModel.fromJson constructor

BaseEntityDataModel.fromJson(
  1. Map<String, dynamic> json,
  2. String? id
)

Creates a BaseEntityDataModel instance from a JSON map and an optional id.

The json parameter is a map containing the data to initialize the model. The id parameter is an optional identifier for the model.

Implementation

factory BaseEntityDataModel.fromJson(Map<String, dynamic> json, String? id) {
  return BaseEntityDataModel(id: id)..map = json;
}