Skip to content

Commit

Permalink
misc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
frank06 committed May 7, 2024
1 parent 8c0b830 commit 79be054
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

## Persistent reactive models in Flutter with zero boilerplate

### NOTE: 2.0 is unstable, use 1.6.0 for now

Flutter Data is a [local-first](https://www.inkandswitch.com/local-first/) data framework with a customizable REST client and powerful model relationships, built on Riverpod.

<small>Inspired by [Ember Data](https://github.com/emberjs/data) and [ActiveRecord](https://guides.rubyonrails.org/active_record_basics.html).</small>
Expand Down
4 changes: 4 additions & 0 deletions lib/src/adapter/watch_adapter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,10 @@ mixin _WatchAdapter<T extends DataModelMixin<T>> on _RemoteAdapter<T> {
DataStateNotifier<T?> notifierFor(T model) {
return watchOneNotifier(model, remote: false);
}

void triggerNotify() {
core._notify([internalType], type: DataGraphEventType.updateNode);
}
}

final coreNotifierThrottleDurationProvider =
Expand Down
1 change: 0 additions & 1 deletion lib/src/model/data_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ mixin DataModelMixin<T extends DataModelMixin<T>> {
String get _internalType => DataHelpers.internalTypeFor(T.toString());
T get _this => this as T;

/// Exposes this type's [Adapter]
Adapter<T> get _adapter => _internalAdaptersMap![_internalType] as Adapter<T>;

T init() {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/storage/local_storage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ class LocalStorage {
final int busyTimeout;

late final String path;
late final bool inIsolate;

@protected
late final Database db;

Future<LocalStorage> initialize({bool inIsolate = false}) async {
if (isInitialized) return this;
this.inIsolate = inIsolate;

final baseDirPath = await baseDirFn();
path = path_helper.join(baseDirPath, 'flutter_data.db');
Expand Down

0 comments on commit 79be054

Please sign in to comment.