refresh method Null safety

void refresh()

Makes a direct update of value adding it to the Stream useful when you make use of Rx for custom Types to referesh your UI.

Sample:

 class Person {
    String name, last;
    int age;
    Person({this.name, this.last, this.age});
    @override
    String toString() => '$name $last, $age years old';
 }

final person = Person(name: 'John', last: 'Doe', age: 18).obs;
person.value.name = 'Roi';
person.refresh();
print( person );

Implementation

void refresh() {
  subject.add(value);
}