DismissedContact constructor

DismissedContact(
  1. RxChatContact contact, {
  2. void onDone(
    1. bool
    )?,
})

Implementation

DismissedContact(this.contact, {void Function(bool)? onDone})
  : _onDone = onDone {
  _timer = Timer.periodic(32.milliseconds, (t) {
    final value = remaining.value - 32;

    if (remaining.value <= 0) {
      remaining.value = 0;
      _done(true);
    } else {
      remaining.value = value;
    }
  });
}