RoomListFilterNotifier constructor

RoomListFilterNotifier(
  1. dynamic selection,
  2. dynamic ref
)

Implementation

RoomListFilterNotifier(
  FilterSelection selection,
  this.ref,
) : super(RoomListFilterState(selection: selection)) {
  ref.listen(persistentRoomListFilterSelector, (previous, next) {
    // the persistance loader might come back a little late ...
    if (state.selection != next) {
      // live update, apply
      state = state.copyWith(selection: next);
    }
  });
}