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