Skip to content

Commit

Permalink
Revert "apptreesoftware#2, map literals"
Browse files Browse the repository at this point in the history
This reverts commit 05efcac.
  • Loading branch information
unicomp21 committed Sep 26, 2021
1 parent 05efcac commit c32a888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class {{.Name}} {
factory {{.Name}}.fromJson(Map<String,dynamic> json) {
{{- range .Fields -}}
{{if .IsMap}}
var {{.Name}}Map = {{.Type[3:len(.Type)]}}{};
var {{.Name}}Map = {{.Type}}();
(json['{{.JSONName}}'] as Map<String, dynamic>).forEach((key, val) {
{{if .MapValueField.IsMessage}}
{{.Name}}Map[key] = {{.MapValueField.Type}}.fromJson(val as Map<String,dynamic>);
Expand Down

0 comments on commit c32a888

Please sign in to comment.