TouchRippleBehavior constructor
const
TouchRippleBehavior({
- TouchRippleOverlapBehavior? overlap,
- double? lowerPercent,
- double? upperPercent,
- double? fadeLowerPercent,
- double? fadeUpperPercent,
- double? eventCallBackableMinPercent,
- Duration? spreadDuration,
- Curve? spreadCurve,
- Duration? fadeInDuration,
- Curve? fadeInCurve,
- Duration? fadeOutDuration,
- Curve? fadeOutCurve,
- Duration? canceledDuration,
- Curve? canceledCurve,
Implementation
const TouchRippleBehavior({
this.overlap,
this.lowerPercent,
this.upperPercent,
this.fadeLowerPercent,
this.fadeUpperPercent,
this.eventCallBackableMinPercent,
this.spreadDuration,
this.spreadCurve,
this.fadeInDuration,
this.fadeInCurve,
this.fadeOutDuration,
this.fadeOutCurve,
this.canceledDuration,
this.canceledCurve,
}) : assert(lowerPercent != null ? lowerPercent <= 1 && lowerPercent >= 0 : true, 'The [lowerPercent] must be defined between 0 and 1'),
assert(upperPercent != null ? upperPercent <= 1 && upperPercent >= 0 : true, 'The [upperPercent] must be defined between 0 and 1'),
assert(
lowerPercent != null ? (upperPercent != null ? upperPercent >= lowerPercent : true) : true,
'[upperPercent] must be greater than [lowerPercent].'
),
assert(eventCallBackableMinPercent != null ? eventCallBackableMinPercent <= 1 && eventCallBackableMinPercent >= 0 : true, 'The [upperPercent] must be defined between 0 and 1'),
assert(
eventCallBackableMinPercent != null ? (lowerPercent != null ? eventCallBackableMinPercent >= lowerPercent : true) : true,
'[eventCallBackMinPercent] must be greater than [lowerPercent].'
'If it is less, the event cannot be called back.'
),
assert(fadeLowerPercent != null ? fadeLowerPercent <= 1 && fadeLowerPercent >= 0 : true, 'The [fadeLowerPercent] must be defined between 0 and 1'),
assert(fadeUpperPercent != null ? fadeUpperPercent <= 1 && fadeUpperPercent >= 0 : true, 'The [fadeUpperPercent] must be defined between 0 and 1'),
assert(
fadeLowerPercent != null ? (fadeUpperPercent != null ? fadeUpperPercent >= fadeLowerPercent : true) : true,
'[fadeUpperPercent] must be greater than [fadeLowerPercent].'
);