Skip to content

Instantly share code, notes, and snippets.

@redbrogdon
Created August 1, 2018 18:31
Show Gist options
  • Select an option

  • Save redbrogdon/e273ca8bb2caca88968596f2850dd83b to your computer and use it in GitHub Desktop.

Select an option

Save redbrogdon/e273ca8bb2caca88968596f2850dd83b to your computer and use it in GitHub Desktop.
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
import 'package:built_value/serializer.dart';
part 'simple_object.g.dart';
abstract class SimpleObject
implements Built<SimpleObject, SimpleObjectBuilder> {
static Serializer<SimpleObject> get serializer =>
_$SimpleObjectSerializer;
@nullable
String get aString;
@nullable
int get anInt;
@nullable
double get aDouble;
@nullable
BuiltList<String> get aListOfStrings;
@nullable
BuiltList<int> get aListOfInts;
@nullable
BuiltList<double> get aListOfDoubles;
SimpleObject._();
factory SimpleObject([updates(SimpleObjectBuilder b)]) =
_$SimpleObject;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment