Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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