diff --git a/mobx_codegen/lib/version.dart b/mobx_codegen/lib/version.dart index bc245f3f..26dc6bd5 100644 --- a/mobx_codegen/lib/version.dart +++ b/mobx_codegen/lib/version.dart @@ -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'; diff --git a/mobx_codegen/test/data/valid_keep_alive_computed_output.dart b/mobx_codegen/test/data/valid_keep_alive_computed_output.dart index db55bce9..576726c4 100644 --- a/mobx_codegen/test/data/valid_keep_alive_computed_output.dart +++ b/mobx_codegen/test/data/valid_keep_alive_computed_output.dart @@ -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; }); } }