fromSchema static method
Generate a model from a json schema
Implementation
static TetaProduct fromSchema(final Map<String, dynamic> json) => TetaProduct(
id: json['_id'] as String? ?? '',
prjId: json['prj_id'] as int? ?? 0,
name: json['name'] as String? ?? '',
price: num.parse('${json['price'] ?? '0.0'}'),
count: json['count'] as int? ?? 0,
isPublic: json['isPublic'] as bool? ?? false,
description: json['description'] as String? ?? '',
image: json['image'] as String? ?? '',
metadata: const <String, dynamic>{},
);