cancel method Null safety

void cancel()

Implementation

void cancel() => client.close();