-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
5,149 additions
and
3,468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
// coverage:ignore-file | ||
// GENERATED CODE - DO NOT MODIFY BY HAND | ||
|
||
part of 'myapp.dart'; | ||
|
||
// ************************************************************************** | ||
// RealmObjectGenerator | ||
// ************************************************************************** | ||
|
||
class Car extends _Car with RealmEntity, RealmObjectBase, RealmObject { | ||
static var _defaultsSet = false; | ||
|
||
@ejson | ||
Car( | ||
String make, { | ||
String? model, | ||
int? kilometers = 500, | ||
Person? owner, | ||
}) { | ||
if (!_defaultsSet) { | ||
_defaultsSet = RealmObjectBase.setDefaults<Car>({ | ||
'kilometers': 500, | ||
}); | ||
} | ||
RealmObjectBase.set(this, 'make', make); | ||
RealmObjectBase.set(this, 'model', model); | ||
RealmObjectBase.set(this, 'kilometers', kilometers); | ||
RealmObjectBase.set(this, 'owner', owner); | ||
} | ||
|
||
Car._(); | ||
|
||
@override | ||
String get make => RealmObjectBase.get<String>(this, 'make') as String; | ||
@override | ||
set make(String value) => RealmObjectBase.set(this, 'make', value); | ||
|
||
@override | ||
String? get model => RealmObjectBase.get<String>(this, 'model') as String?; | ||
@override | ||
set model(String? value) => RealmObjectBase.set(this, 'model', value); | ||
|
||
@override | ||
int? get kilometers => RealmObjectBase.get<int>(this, 'kilometers') as int?; | ||
@override | ||
set kilometers(int? value) => RealmObjectBase.set(this, 'kilometers', value); | ||
|
||
@override | ||
Person? get owner => RealmObjectBase.get<Person>(this, 'owner') as Person?; | ||
@override | ||
set owner(covariant Person? value) => | ||
RealmObjectBase.set(this, 'owner', value); | ||
|
||
@override | ||
Stream<RealmObjectChanges<Car>> get changes => | ||
RealmObjectBase.getChanges<Car>(this); | ||
|
||
@override | ||
Car freeze() => RealmObjectBase.freezeObject<Car>(this); | ||
|
||
static SchemaObject get schema => _schema ??= _initSchema(); | ||
static SchemaObject? _schema; | ||
static SchemaObject _initSchema() { | ||
RealmObjectBase.registerFactory(Car._); | ||
return const SchemaObject(ObjectType.realmObject, Car, 'Car', [ | ||
SchemaProperty('make', RealmPropertyType.string), | ||
SchemaProperty('model', RealmPropertyType.string, optional: true), | ||
SchemaProperty('kilometers', RealmPropertyType.int, optional: true), | ||
SchemaProperty('owner', RealmPropertyType.object, | ||
optional: true, linkTarget: 'Person'), | ||
]); | ||
} | ||
} | ||
|
||
class Person extends _Person with RealmEntity, RealmObjectBase, RealmObject { | ||
static var _defaultsSet = false; | ||
|
||
@ejson | ||
Person( | ||
String name, { | ||
int age = 1, | ||
}) { | ||
if (!_defaultsSet) { | ||
_defaultsSet = RealmObjectBase.setDefaults<Person>({ | ||
'age': 1, | ||
}); | ||
} | ||
RealmObjectBase.set(this, 'name', name); | ||
RealmObjectBase.set(this, 'age', age); | ||
} | ||
|
||
Person._(); | ||
|
||
@override | ||
String get name => RealmObjectBase.get<String>(this, 'name') as String; | ||
@override | ||
set name(String value) => RealmObjectBase.set(this, 'name', value); | ||
|
||
@override | ||
int get age => RealmObjectBase.get<int>(this, 'age') as int; | ||
@override | ||
set age(int value) => RealmObjectBase.set(this, 'age', value); | ||
|
||
@override | ||
Stream<RealmObjectChanges<Person>> get changes => | ||
RealmObjectBase.getChanges<Person>(this); | ||
|
||
@override | ||
Person freeze() => RealmObjectBase.freezeObject<Person>(this); | ||
|
||
static SchemaObject get schema => _schema ??= _initSchema(); | ||
static SchemaObject? _schema; | ||
static SchemaObject _initSchema() { | ||
RealmObjectBase.registerFactory(Person._); | ||
return const SchemaObject(ObjectType.realmObject, Person, 'Person', [ | ||
SchemaProperty('name', RealmPropertyType.string), | ||
SchemaProperty('age', RealmPropertyType.int), | ||
]); | ||
} | ||
} |
Oops, something went wrong.