JsonModel.fromMap constructor
JsonModel.fromMap(})
Implementation
factory JsonModel.fromMap(
String fileName,
Map<String, dynamic> jsonMap, {
String? packageName,
String? indexPath,
String? relativePath,
}) {
final dartDeclarations = <DartDeclaration>[];
jsonMap.forEach((key, value) {
return dartDeclarations.add(DartDeclaration.fromKeyValue(key, value));
});
// add key to templatestring
// add valuetype to templatestring
return JsonModel(
fileName,
dartDeclarations,
relativePath: relativePath,
packageName: packageName,
indexPath: indexPath,
);
}