bind method

void bind(
  1. String class_,
  2. Stream<bool> changes
)

Implementation

void bind(String class_, Stream<bool> changes) {
  changes.listen((bool has) {
    if (has)
      add(class_);
    else
      remove(class_);
  });
}