Skip to content

Commit 6ae0b32

Browse files
committed
Enable simulator hot reloading.
1 parent 3586bbe commit 6ae0b32

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

example/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
1113
migrate_working_dir/
1214

1315
# IntelliJ related

example/macos/Runner/AppDelegate.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ class AppDelegate: FlutterAppDelegate {
66
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
77
return true
88
}
9+
10+
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
11+
return true
12+
}
913
}

lib/src/data/data_manager.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -767,6 +767,12 @@ class DataManager {
767767
_publishModelStreamController.add(_publishModel);
768768
}
769769

770+
Future<void> setPublishModel(SDKPublishModel model) async {
771+
_publishModel = model;
772+
await emitPublishModel();
773+
savePublishModel();
774+
}
775+
770776
/// Saves the current [_publishModel] if it is not null to the local cache
771777
/// using [localDataRepository].
772778
void savePublishModel() {

0 commit comments

Comments
 (0)