setAuthorization method Null safety

void setAuthorization(
  1. String? key
)

Implementation

void setAuthorization(String? key) {
  dio.options.headers['Authorization'] = 'Bearer $key';
}