Skip to content

Commit

Permalink
Merge 89b0725 into 889c514
Browse files Browse the repository at this point in the history
  • Loading branch information
desistefanova committed Feb 14, 2022
2 parents 889c514 + 89b0725 commit 3c1ebff
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 50 deletions.
2 changes: 1 addition & 1 deletion example/bin/myapp.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ part 'myapp.g.dart';

@RealmModel()
class _Car {
late final String make;
late String make;
String? model;
int? kilometers = 500;
_Person? owner;
Expand Down
21 changes: 6 additions & 15 deletions example/bin/myapp.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flutter/realm_flutter/example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ part 'main.g.dart';

@RealmModel()
class _Car {
late final String make;
late String make;
String? model;
int? kilometers = 500;
_Person? owner;
Expand Down
21 changes: 6 additions & 15 deletions flutter/realm_flutter/example/lib/main.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions test/realm_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ part 'realm_test.g.dart';
@RealmModel()
class _Car {
@PrimaryKey()
late final String make;
late String make;
}

@RealmModel()
Expand All @@ -42,7 +42,7 @@ class _Person {
@RealmModel()
class _Dog {
@PrimaryKey()
late final String name;
late String name;

late int? age;

Expand All @@ -52,14 +52,14 @@ class _Dog {
@RealmModel()
class _Team {
late String name;
late final List<_Person> players;
late final List<int> scores;
late List<_Person> players;
late List<int> scores;
}

@RealmModel()
class _Student {
@PrimaryKey()
late final int number;
late int number;
late String? name;
late int? yearOfBirth;
late _School? school;
Expand All @@ -68,11 +68,11 @@ class _Student {
@RealmModel()
class _School {
@PrimaryKey()
late final String name;
late String name;
late String? city;
final List<_Student> students = [];
List<_Student> students = [];
late _School? branchOfSchool;
late final List<_School> branches;
late List<_School> branches;
}

String? testName;
Expand Down Expand Up @@ -402,7 +402,7 @@ Future<void> main([List<String>? args]) async {

expect(() {
realm.write(() {
car.make = "Audi"; // setting late final is a runtime error :-/
car.make = "Audi";
});
}, throws<RealmUnsupportedSetError>());

Expand Down
21 changes: 12 additions & 9 deletions test/realm_test.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c1ebff

Please sign in to comment.