init method

void init()

Initialize class

Implementation

void init() {
  baseOptions = BaseOptions(
    baseUrl: baseUrl,
    headers: {
      "Content-type": "application/json",
      "Accept": "application/json",
    },
    connectTimeout: Duration(seconds: 5),
  );

  _api = Dio(baseOptions);

  if (useInterceptors) {
    _addInterceptors();
  }
}