Skip to content

Instantly share code, notes, and snippets.

@sgr-ksmt
Created March 24, 2020 06:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgr-ksmt/bbfe922c7aa2e0885561552491139f8f to your computer and use it in GitHub Desktop.
Save sgr-ksmt/bbfe922c7aa2e0885561552491139f8f to your computer and use it in GitHub Desktop.
@freezed snippet.
{
"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