BloomRpcContract<TInput, TOutput> constructor
const
BloomRpcContract<TInput, TOutput> ({
- required BloomHttpMethod method,
- required String pathTemplate,
- dynamic encodeInput(
- TInput input
- TInput decodeInput(
- dynamic json
- dynamic encodeOutput(
- TOutput output
- TOutput decodeOutput(
- dynamic json
- String? summary,
- String? description,
- List customCacheKey(
- TInput input
Creates a BloomRpcContract with explicit method, pathTemplate, and codecs.
const getUser = BloomRpcContract<void, User>(
method: BloomHttpMethod.get,
pathTemplate: '/users/:id',
decodeOutput: User.fromJson,
);
Implementation
const BloomRpcContract({
required this.method,
required this.pathTemplate,
this.encodeInput,
this.decodeInput,
this.encodeOutput,
this.decodeOutput,
this.summary,
this.description,
this.customCacheKey,
});