Skip to content

Commit

Permalink
feat: examples/alice_objectbox
Browse files Browse the repository at this point in the history
  • Loading branch information
techouse committed Jun 28, 2024
1 parent d091f3b commit 01ff4bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/alice_objectbox/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();

/// Initialize AliceStore before running the app.
final AliceStore store = await AliceStore.create();
final AliceStore store = await AliceStore.create(empty: true);

runApp(MyApp(store: store));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class CachedAliceHttpCall implements AliceHttpCall {
CachedAliceHttpCall(
this.id, {
this.objectId = 0,
DateTime? createdTime,
this.client = '',
this.loading = true,
this.secure = false,
Expand All @@ -21,9 +22,7 @@ class CachedAliceHttpCall implements AliceHttpCall {
this.server = '',
this.uri = '',
this.duration = 0,
}) {
createdTime = DateTime.now();
}
}) : createdTime = createdTime ?? DateTime.now();

@Id()
int objectId;
Expand All @@ -35,7 +34,7 @@ class CachedAliceHttpCall implements AliceHttpCall {

@override
@Property(type: PropertyType.dateNano)
late DateTime createdTime;
DateTime createdTime;

@override
String client;
Expand Down
11 changes: 6 additions & 5 deletions packages/alice_objectbox/lib/objectbox.g.dart

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

0 comments on commit 01ff4bc

Please sign in to comment.