ChopperApi constructor

const ChopperApi({
  1. String baseUrl = '',
})

Defines a Chopper API.

Must be used on an abstract class that extends the ChopperService class. To simplify instantiation, it's recommended to define a static create method.

@ChopperApi(baseUrl: '/todos')
abstract class TodosListService extends ChopperService {
  static TodosListService create([ChopperClient client]) =>
      _$TodosListService(client);
}

See Method to define an HTTP request

Implementation

const ChopperApi({
  this.baseUrl = '',
});