Skip to content

Commit

Permalink
feat: add fromJson support to the data class (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
shan-shaji authored Mar 31, 2023
1 parent 55b5f50 commit 1807e19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Log

## [0.0.2] - 2023-03-31
- Add `fromJson` support for `fdataClass`

## [0.0.1] - 2022-08-18

- Initial releas
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"repository": {
"url": "https://github.com/Arkroot-Innovations/freezed-snippets"
},
"version": "0.0.1",
"version": "0.0.2",
"engines": {
"vscode": "^1.71.0"
},
Expand Down
6 changes: 4 additions & 2 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
"description": "Creates a filled-in freezed part statement"
},
"Freezed Data Class": {
"prefix": "fdataclass",
"prefix": ["fdataclass", "fdc"],
"body": [
"@freezed",
"class ${1:DataClass} with _$${1:DataClass}{",
" const factory ${1:DataClass}(${2}) = _${1:DataClass};",
"}"
"}",
"factory ${1:DataClass}.fromJson(Map<String, dynamic> json)",
"=> _$${1:DataClass}FromJson(json);"
],
"description": "Freezed Data Class"
},
Expand Down

0 comments on commit 1807e19

Please sign in to comment.