Skip to content

Instantly share code, notes, and snippets.

@featzima
Last active April 28, 2019 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save featzima/e6a080b06a23121fe7889ca8baf9c95a to your computer and use it in GitHub Desktop.
Save featzima/e6a080b06a23121fe7889ca8baf9c95a to your computer and use it in GitHub Desktop.
Live Templete of the IDEA (the Android Studio) for creating data classes for Dart Built Value plugin.
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part '$name$.g.dart';
abstract class $Name$ implements Built<$Name$, $Name$Builder> {
static Serializer<$Name$> get serializer => _$$$name$Serializer;
// String get id;$END$
$Name$._();
factory $Name$([updates($Name$Builder b)]) = _$$$Name$;
}
@featzima
Copy link
Author

  • name = fileNameWithoutExtension()
  • Name = capitalize(fileNameWithoutExtension())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment