writeTheWillWriteList method
void
writeTheWillWriteList(
{ - required void whenComplete(),
- 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();
}
}