Skip to content

Commit

Permalink
feat: add keepalive to computed
Browse files Browse the repository at this point in the history
  • Loading branch information
amondnet committed Dec 27, 2023
1 parent 8db3f62 commit 4f3a787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mobx_codegen/lib/version.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated via set_version.dart. !!!DO NOT MODIFY BY HAND!!!

/// The current version as per `pubspec.yaml`.
const version = '2.5.0';
const version = '2.6.0';
6 changes: 5 additions & 1 deletion mobx_codegen/test/data/valid_keep_alive_computed_output.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ mixin _$TestStore on _TestStore, Store {
return super.username;
}

bool _usernameIsInitialized = false;

@override
set username(String value) {
_$usernameAtom.reportWrite(value, super.username, () {
_$usernameAtom
.reportWrite(value, _usernameIsInitialized ? super.username : null, () {
super.username = value;
_usernameIsInitialized = true;
});
}
}

0 comments on commit 4f3a787

Please sign in to comment.