Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't update the value #6

Closed
enri90 opened this issue Apr 12, 2021 · 3 comments
Closed

Don't update the value #6

enri90 opened this issue Apr 12, 2021 · 3 comments

Comments

@enri90
Copy link

enri90 commented Apr 12, 2021

I don't understand why in this version it doesn't update
stacked: ^2.0.2
stacked_services: ^0.8.1
injectable: ^1.2.2
observable_ish: ^3.0.0

`
RxValue<String?> _fullname = RxValue<String?>(null);
.....
_fullname.value = 'test'; <--- work after
User user = await _firestoreService.getUser(uid);
_fullname.value = user.name; <--- not work

`

I don't update the value after await
someone has the same problem as me in the null-safety version?

@tejainece
Copy link
Member

@enri90 I will try to reproduce and fix it. A simple isolated example reproducing this error bug will be very helpful.

@tejainece
Copy link
Member

@enri90 the following code works fine:

import 'package:observable_ish/observable_ish.dart';

main() {
  final rxInts = RxValue<int>(5);
  print(rxInts.value); // => 5
  rxInts.value = 10;
  rxInts.value = 15;
  rxInts.values.listen((int v) => print(v)); // => 15, 20, 25
  rxInts.value = 20;
  rxInts.value = 25;
}

produces expected result:

5
15
20
25

@tejainece
Copy link
Member

Please reopen the issue if you still have the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants