Unverified Commit 5bc4a761 authored by Newton Michael's avatar Newton Michael Committed by GitHub

use super parameters in framework (#103620)

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