writeTheWillWriteList method

void writeTheWillWriteList({
  1. required void whenComplete(),
  2. required bool withResponse,
})

Implementation

void writeTheWillWriteList({required void Function() whenComplete,required bool withResponse,}){
  if(willWriteList.isNotEmpty){
    _write(data: willWriteList.first,withResponse:withResponse,whenComplete: (){
      if(willWriteList.isNotEmpty){willWriteList.removeAt(0);}
      writeTheWillWriteList(whenComplete:whenComplete,withResponse:withResponse);
    });

    lastWriteTime = nowTimeMilliSecond();
  }else{
    whenComplete();
  }
}