ChopperApi class final
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
- Annotations
-
- @immutable
- @Target({TargetKind.classType})
Constructors
- ChopperApi({String baseUrl = ''})
-
Defines a Chopper API.
const
Properties
- baseUrl → String
-
A part of a URL that every request defined inside a class annotated with ChopperApi will be prefixed with.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited