$declaration constant

BridgeClassDef const $declaration

Compile-type class declaration for MethodCodec

Implementation

static const $declaration = BridgeClassDef(
    BridgeClassType($type, isAbstract: true),
    constructors: {},
    methods: {
      'encodeMethodCall': BridgeMethodDef(BridgeFunctionDef(
          returns:
              BridgeTypeAnnotation(BridgeTypeRef(TypedDataTypes.byteData)),
          params: [
            BridgeParameter(
                'call', BridgeTypeAnnotation($MethodCall.$type), false)
          ])),
      'decodeMethodCall': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation($MethodCall.$type),
          params: [
            BridgeParameter(
                'data',
                BridgeTypeAnnotation(BridgeTypeRef(TypedDataTypes.byteData)),
                false)
          ])),
      'encodeSuccessEnvelope': BridgeMethodDef(BridgeFunctionDef(
          returns:
              BridgeTypeAnnotation(BridgeTypeRef(TypedDataTypes.byteData)),
          params: [
            BridgeParameter('result',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dynamic)), true)
          ])),
      'encodeErrorEnvelope': BridgeMethodDef(BridgeFunctionDef(
          returns:
              BridgeTypeAnnotation(BridgeTypeRef(TypedDataTypes.byteData)),
          namedParams: [
            BridgeParameter('code',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false),
            BridgeParameter('message',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false),
            BridgeParameter('details',
                BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dynamic)), true)
          ])),
      'decodeEnvelope': BridgeMethodDef(BridgeFunctionDef(
          returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.dynamic)),
          params: [
            BridgeParameter(
                'data',
                BridgeTypeAnnotation(BridgeTypeRef(TypedDataTypes.byteData)),
                false)
          ])),
    },
    wrap: true);