toModel method

Model toModel({
  1. String id = "",
  2. String userId = "",
})

Creates a Model from a num. Encapsulates the data inside model->data->"data".

Implementation

Model toModel({String id = "", String userId = ""}) => Model(
      id: id,
      userId: userId,
      data: {
        "data": this,
      },
    );