$declaration constant
BridgeClassDef
const $declaration
Compile-time class declaration for $Duration
Implementation
static const $declaration = BridgeClassDef(BridgeClassType($type),
constructors: {
'': BridgeConstructorDef(BridgeFunctionDef(
returns: BridgeTypeAnnotation($type),
params: [],
namedParams: [
BridgeParameter(
'days',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
BridgeParameter(
'hours',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
BridgeParameter(
'minutes',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
BridgeParameter(
'seconds',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
BridgeParameter(
'milliseconds',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
BridgeParameter(
'microseconds',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int),
nullable: true),
true),
]))
},
methods: {
'*': BridgeMethodDef(
BridgeFunctionDef(returns: BridgeTypeAnnotation($type), params: [
BridgeParameter('factor',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.num)), false)
], namedParams: [])),
'>': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)),
params: [
BridgeParameter('other', BridgeTypeAnnotation($type), false)
]),
),
'>=': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)),
params: [
BridgeParameter('other', BridgeTypeAnnotation($type), false)
]),
),
'<': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)),
params: [
BridgeParameter('other', BridgeTypeAnnotation($type), false)
]),
),
'<=': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool)),
params: [
BridgeParameter('other', BridgeTypeAnnotation($type), false)
]),
),
},
getters: {
'zero': BridgeMethodDef(
BridgeFunctionDef(returns: BridgeTypeAnnotation($type)),
isStatic: true),
'microsecondsPerMillisecond': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: true),
'millisecondsPerSecond': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: true),
'secondsPerMinute': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: true),
'minutesPerHour': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: true),
'hoursPerDay': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: true),
'inDays': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'inHours': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'inMinutes': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'inSeconds': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'inMilliseconds': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'inMicroseconds': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'compareTo': BridgeMethodDef(
BridgeFunctionDef(params: [
BridgeParameter(
'other',
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.duration)),
false)
], returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.int))),
isStatic: false),
'isNegative': BridgeMethodDef(
BridgeFunctionDef(
returns: BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.bool))),
isStatic: false),
'abs': BridgeMethodDef(
BridgeFunctionDef(
params: [],
returns:
BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.duration))),
isStatic: false),
},
setters: {},
fields: {},
wrap: true);