HttpApi class

Entry point annotation for generating requests


part 'file_name.http.dart';

@HttpApi(
  'http://localhost:3000',
  useFlutterCompute: true // defaults to false
)
abstract class MyApi {
  // create a factory redirect (this is required)
  factory MyApi() = _MyApi;

  // optional close method to dispose resources
  void close();
}

Constructors

HttpApi(String baseUrl, {bool useFlutterCompute = false})
const

Properties

baseUrl String
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
useFlutterCompute bool
final

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