$declaration constant
BridgeClassDef
const $declaration
Compile-time bridged class declaration for $StreamSubscription
Implementation
static const $declaration = BridgeClassDef(
BridgeClassType($type,
isAbstract: true, generics: {'T': BridgeGenericParam()}),
constructors: {
'': BridgeConstructorDef(
BridgeFunctionDef(returns: BridgeTypeAnnotation($type))),
},
methods: {
'cancel': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(
BridgeTypeRef(CoreTypes.future, [BridgeTypeRef.ref('T')])))),
'asFuture': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(
BridgeTypeRef(CoreTypes.future, [BridgeTypeRef.ref('T')])),
params: [
BridgeParameter(
'futureValue',
BridgeTypeAnnotation(BridgeTypeRef.ref('T'), nullable: true),
true)
])),
'pause': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
params: [
BridgeParameter('resumeSignal',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.future)), true)
])),
'resume': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)))),
'onDone': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
params: [
BridgeParameter(
'handleDone',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.function),
nullable: true),
false)
])),
'onError': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.voidType)),
params: [
BridgeParameter(
'handleError',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.function),
nullable: true),
false)
])),
},
getters: {
'isPaused': BridgeMethodDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)))),
},
setters: {},
fields: {},
wrap: true);