use super parameters in framework (#103620)
This commit is contained in:
@@ -920,10 +920,9 @@ class _CupertinoEdgeShadowDecoration extends Decoration {
|
||||
class _CupertinoEdgeShadowPainter extends BoxPainter {
|
||||
_CupertinoEdgeShadowPainter(
|
||||
this._decoration,
|
||||
VoidCallback? onChange,
|
||||
super.onChange,
|
||||
) : assert(_decoration != null),
|
||||
assert(_decoration._colors == null || _decoration._colors!.length > 1),
|
||||
super(onChange);
|
||||
assert(_decoration._colors == null || _decoration._colors!.length > 1);
|
||||
|
||||
final _CupertinoEdgeShadowDecoration _decoration;
|
||||
|
||||
|
||||
@@ -187,8 +187,8 @@ class _RenderCupertinoTextSelectionToolbarShape extends RenderShiftedBox {
|
||||
_RenderCupertinoTextSelectionToolbarShape(
|
||||
this._anchor,
|
||||
this._isAbove,
|
||||
RenderBox? child,
|
||||
) : super(child);
|
||||
super.child,
|
||||
);
|
||||
|
||||
|
||||
@override
|
||||
|
||||
@@ -508,9 +508,8 @@ class VerticalMultiDragGestureRecognizer extends MultiDragGestureRecognizer {
|
||||
}
|
||||
|
||||
class _DelayedPointerState extends MultiDragPointerState {
|
||||
_DelayedPointerState(Offset initialPosition, Duration delay, PointerDeviceKind kind, DeviceGestureSettings? deviceGestureSettings)
|
||||
: assert(delay != null),
|
||||
super(initialPosition, kind, deviceGestureSettings) {
|
||||
_DelayedPointerState(super.initialPosition, Duration delay, super.kind, super.deviceGestureSettings)
|
||||
: assert(delay != null) {
|
||||
_timer = Timer(delay, _delayPassed);
|
||||
}
|
||||
|
||||
|
||||
@@ -334,12 +334,11 @@ class InkDecoration extends InkFeature {
|
||||
InkDecoration({
|
||||
required Decoration? decoration,
|
||||
required ImageConfiguration configuration,
|
||||
required MaterialInkController controller,
|
||||
required super.controller,
|
||||
required super.referenceBox,
|
||||
super.onRemoved,
|
||||
}) : assert(configuration != null),
|
||||
_configuration = configuration,
|
||||
super(controller: controller) {
|
||||
_configuration = configuration {
|
||||
this.decoration = decoration;
|
||||
controller.addInkFeature(this);
|
||||
}
|
||||
|
||||
@@ -37,9 +37,9 @@ class InkHighlight extends InteractiveInkFeature {
|
||||
///
|
||||
/// When the highlight is removed, `onRemoved` will be called.
|
||||
InkHighlight({
|
||||
required MaterialInkController controller,
|
||||
required super.controller,
|
||||
required super.referenceBox,
|
||||
required Color color,
|
||||
required super.color,
|
||||
required TextDirection textDirection,
|
||||
BoxShape shape = BoxShape.rectangle,
|
||||
double? radius,
|
||||
@@ -57,8 +57,7 @@ class InkHighlight extends InteractiveInkFeature {
|
||||
_borderRadius = borderRadius ?? BorderRadius.zero,
|
||||
_customBorder = customBorder,
|
||||
_textDirection = textDirection,
|
||||
_rectCallback = rectCallback,
|
||||
super(controller: controller, color: color) {
|
||||
_rectCallback = rectCallback {
|
||||
_alphaController = AnimationController(duration: fadeDuration, vsync: controller.vsync)
|
||||
..addListener(controller.markNeedsPaint)
|
||||
..addStatusListener(_handleAlphaStatusChanged)
|
||||
|
||||
@@ -99,8 +99,8 @@ class InkSparkle extends InteractiveInkFeature {
|
||||
/// identified in the shader as "noise", and the sparkles are derived from
|
||||
/// pseudorandom triangular noise.
|
||||
InkSparkle({
|
||||
required MaterialInkController controller,
|
||||
required RenderBox referenceBox,
|
||||
required super.controller,
|
||||
required super.referenceBox,
|
||||
required super.color,
|
||||
required Offset position,
|
||||
required TextDirection textDirection,
|
||||
@@ -118,8 +118,7 @@ class InkSparkle extends InteractiveInkFeature {
|
||||
_customBorder = customBorder,
|
||||
_textDirection = textDirection,
|
||||
_targetRadius = (radius ?? _getTargetRadius(referenceBox, containedInkWell, rectCallback, position)) * _targetRadiusMultiplier,
|
||||
_clipCallback = _getClipCallback(referenceBox, containedInkWell, rectCallback),
|
||||
super(controller: controller, referenceBox: referenceBox) {
|
||||
_clipCallback = _getClipCallback(referenceBox, containedInkWell, rectCallback) {
|
||||
// InkSparkle will not be painted until the async compilation completes.
|
||||
_InkSparkleFactory.compileShaderIfNecessary();
|
||||
controller.addInkFeature(this);
|
||||
|
||||
@@ -82,9 +82,8 @@ class UnderlineTabIndicator extends Decoration {
|
||||
}
|
||||
|
||||
class _UnderlinePainter extends BoxPainter {
|
||||
_UnderlinePainter(this.decoration, VoidCallback? onChanged)
|
||||
: assert(decoration != null),
|
||||
super(onChanged);
|
||||
_UnderlinePainter(this.decoration, super.onChanged)
|
||||
: assert(decoration != null);
|
||||
|
||||
final UnderlineTabIndicator decoration;
|
||||
|
||||
|
||||
@@ -391,9 +391,8 @@ class BoxDecoration extends Decoration {
|
||||
|
||||
/// An object that paints a [BoxDecoration] into a canvas.
|
||||
class _BoxDecorationPainter extends BoxPainter {
|
||||
_BoxDecorationPainter(this._decoration, VoidCallback? onChanged)
|
||||
: assert(_decoration != null),
|
||||
super(onChanged);
|
||||
_BoxDecorationPainter(this._decoration, super.onChanged)
|
||||
: assert(_decoration != null);
|
||||
|
||||
final BoxDecoration _decoration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user