ThingModel.fromJson constructor
Creates a new ThingModel from a json
object.
Implementation
factory ThingModel.fromJson(
Map<String, dynamic> json, {
// ignore: avoid_unused_constructor_parameters
bool validate = true,
}) {
final Set<String> parsedFields = {};
final title = json.parseField<String>("title", parsedFields);
final id = json.parseField<String>("id", parsedFields);
return ThingModel(
title: title,
id: id,
);
}