$declaration constant
BridgeClassDef
const $declaration
Compile-time bridge class declaration for $Utf8Codec
Implementation
static const $declaration = BridgeClassDef(
BridgeClassType($type, $extends: BridgeTypeRef(ConvertTypes.encoding)),
constructors: {
'': BridgeConstructorDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation($type),
params: [],
namedParams: [
BridgeParameter('allowMalformed',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true)
]))
},
methods: {
'encode': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(
BridgeTypeRef(CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])),
params: [
BridgeParameter('input',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), false),
])),
'decode': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)),
params: [
BridgeParameter(
'codeUnits',
BridgeTypeAnnotation(BridgeTypeRef(
CoreTypes.list, [BridgeTypeRef(CoreTypes.int)])),
false),
],
namedParams: [
BridgeParameter('allowMalformed',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)), true)
])),
},
getters: {
'decoder': BridgeMethodDef(BridgeFunctionDef(
returns:
BridgeTypeAnnotation(BridgeTypeRef(ConvertTypes.utf8Decoder)))),
},
setters: {},
fields: {},
wrap: true);