Unverified Commit 930403c6 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Remove unused clipBehavior from OverflowBar (#141976)

Fixes https://github.com/flutter/flutter/issues/141606.

OverflowBar doesn't do any clipping and therefore there's no need to specify a clip behavior.
parent 2b6c2eee
...@@ -62,7 +62,6 @@ class OverflowBar extends MultiChildRenderObjectWidget { ...@@ -62,7 +62,6 @@ class OverflowBar extends MultiChildRenderObjectWidget {
this.overflowAlignment = OverflowBarAlignment.start, this.overflowAlignment = OverflowBarAlignment.start,
this.overflowDirection = VerticalDirection.down, this.overflowDirection = VerticalDirection.down,
this.textDirection, this.textDirection,
this.clipBehavior = Clip.none,
super.children, super.children,
}); });
...@@ -192,11 +191,6 @@ class OverflowBar extends MultiChildRenderObjectWidget { ...@@ -192,11 +191,6 @@ class OverflowBar extends MultiChildRenderObjectWidget {
/// text and text-direction-sensitive render objects. /// text and text-direction-sensitive render objects.
final TextDirection? textDirection; final TextDirection? textDirection;
/// {@macro flutter.material.Material.clipBehavior}
///
/// Defaults to [Clip.none].
final Clip clipBehavior;
@override @override
RenderObject createRenderObject(BuildContext context) { RenderObject createRenderObject(BuildContext context) {
return _RenderOverflowBar( return _RenderOverflowBar(
...@@ -206,7 +200,6 @@ class OverflowBar extends MultiChildRenderObjectWidget { ...@@ -206,7 +200,6 @@ class OverflowBar extends MultiChildRenderObjectWidget {
overflowAlignment: overflowAlignment, overflowAlignment: overflowAlignment,
overflowDirection: overflowDirection, overflowDirection: overflowDirection,
textDirection: textDirection ?? Directionality.of(context), textDirection: textDirection ?? Directionality.of(context),
clipBehavior: clipBehavior,
); );
} }
...@@ -218,8 +211,7 @@ class OverflowBar extends MultiChildRenderObjectWidget { ...@@ -218,8 +211,7 @@ class OverflowBar extends MultiChildRenderObjectWidget {
..overflowSpacing = overflowSpacing ..overflowSpacing = overflowSpacing
..overflowAlignment = overflowAlignment ..overflowAlignment = overflowAlignment
..overflowDirection = overflowDirection ..overflowDirection = overflowDirection
..textDirection = textDirection ?? Directionality.of(context) ..textDirection = textDirection ?? Directionality.of(context);
..clipBehavior = clipBehavior;
} }
@override @override
...@@ -247,14 +239,12 @@ class _RenderOverflowBar extends RenderBox ...@@ -247,14 +239,12 @@ class _RenderOverflowBar extends RenderBox
OverflowBarAlignment overflowAlignment = OverflowBarAlignment.start, OverflowBarAlignment overflowAlignment = OverflowBarAlignment.start,
VerticalDirection overflowDirection = VerticalDirection.down, VerticalDirection overflowDirection = VerticalDirection.down,
required TextDirection textDirection, required TextDirection textDirection,
Clip clipBehavior = Clip.none,
}) : _spacing = spacing, }) : _spacing = spacing,
_alignment = alignment, _alignment = alignment,
_overflowSpacing = overflowSpacing, _overflowSpacing = overflowSpacing,
_overflowAlignment = overflowAlignment, _overflowAlignment = overflowAlignment,
_overflowDirection = overflowDirection, _overflowDirection = overflowDirection,
_textDirection = textDirection, _textDirection = textDirection {
_clipBehavior = clipBehavior {
addAll(children); addAll(children);
} }
...@@ -318,17 +308,6 @@ class _RenderOverflowBar extends RenderBox ...@@ -318,17 +308,6 @@ class _RenderOverflowBar extends RenderBox
markNeedsLayout(); markNeedsLayout();
} }
Clip get clipBehavior => _clipBehavior;
Clip _clipBehavior = Clip.none;
set clipBehavior(Clip value) {
if (value == _clipBehavior) {
return;
}
_clipBehavior = value;
markNeedsPaint();
markNeedsSemanticsUpdate();
}
@override @override
void setupParentData(RenderBox child) { void setupParentData(RenderBox child) {
if (child.parentData is! _OverflowBarParentData) { if (child.parentData is! _OverflowBarParentData) {
......
...@@ -13,7 +13,6 @@ void main() { ...@@ -13,7 +13,6 @@ void main() {
expect(bar.overflowSpacing, 0); expect(bar.overflowSpacing, 0);
expect(bar.overflowDirection, VerticalDirection.down); expect(bar.overflowDirection, VerticalDirection.down);
expect(bar.textDirection, null); expect(bar.textDirection, null);
expect(bar.clipBehavior, Clip.none);
expect(bar.children, const <Widget>[]); expect(bar.children, const <Widget>[]);
}); });
......
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