platform/angel_serialize_generator/test/models/subclass.dart

23 lines
347 B
Dart
Raw Normal View History

2019-07-04 18:30:45 +00:00
import 'package:angel_serialize/angel_serialize.dart';
part 'subclass.g.dart';
@serializable
class _Animal {
@notNull
String genus;
@notNull
String species;
}
@serializable
class _Bird extends _Animal {
@DefaultsTo(false)
bool isSparrow;
}
var saxaulSparrow = Bird(
genus: 'Passer',
species: 'ammodendri',
isSparrow: true,
);