logout method
Implementation
@override
Future<void> logout() {
return request(
'/logout',
RequestOption(
method: 'POST',
))
.then((value) => clearSession())
.catchError((onError) => clearSession());
}