createCalling method

  1. @override
Calling createCalling(
  1. BuildContext context
)
override

Implementation

@override
Calling createCalling(BuildContext context) {
  if (preferredType == null) {
    return _DefaultEndpointCalling(context as EndpointCallingBinding);
  }
  switch (preferredType!) {
    case EndpointPreferredType.body:
      return _BodyEndpointCalling(context as EndpointCallingBinding);
    case EndpointPreferredType.response:
      return _MessageEndpointCalling(context as EndpointCallingBinding);
    case EndpointPreferredType.anyEncodable:
      return _AnyEncodableEndpointCalling(context as EndpointCallingBinding);
    case EndpointPreferredType.dbResult:
      return _DbResultEndpointCalling(context as EndpointCallingBinding);
    case EndpointPreferredType.accessEvent:
      return _AccessEventEndpointCalling(context as EndpointCallingBinding);
  }
}