diff --git a/packages/flutter/lib/src/widgets/overflow_bar.dart b/packages/flutter/lib/src/widgets/overflow_bar.dart index 75291df635..b6d9f50762 100644 --- a/packages/flutter/lib/src/widgets/overflow_bar.dart +++ b/packages/flutter/lib/src/widgets/overflow_bar.dart @@ -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) { diff --git a/packages/flutter/test/widgets/overflow_bar_test.dart b/packages/flutter/test/widgets/overflow_bar_test.dart index d8e9520b20..a98b84eee9 100644 --- a/packages/flutter/test/widgets/overflow_bar_test.dart +++ b/packages/flutter/test/widgets/overflow_bar_test.dart @@ -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 []); });