Created
March 24, 2020 06:25
-
-
Save sgr-ksmt/bbfe922c7aa2e0885561552491139f8f to your computer and use it in GitHub Desktop.
@freezed snippet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"freezed":{ | |
"prefix": "freezed", | |
"body": [ | |
"import 'package:flutter/foundation.dart';", | |
"import 'package:freezed_annotation/freezed_annotation.dart';", | |
"", | |
"part '$1.freezed.dart';", | |
"part '$1.g.dart';", | |
"", | |
"@freezed", | |
"abstract class $2 with _$$2 {", | |
" const factory $2({}) = _$2;", | |
"", | |
" factory $2.fromJson(Map<String, dynamic> json) => _$$2FromJson(json);", | |
"}", | |
], | |
"description": "Add freezed model" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment