Unverified Commit ef42c36a authored by Tom Robinson's avatar Tom Robinson Committed by GitHub

Cleanup widgets/sliver_persistent_header.dart with resolution of dart-lang/sdk#31543 (#35828)

* Remove extra classes.

Now that https://github.com/dart-lang/sdk/issues/31543 is fixed, we
can remove extra classes.

* Add snapConfiguration to parameters for _RenderSliverFloatingPersistentHeaderForWidgets and _RenderSliverFloatingPinnedPersistentHeaderForWidgets constructors.
parent 3122786a
......@@ -284,10 +284,7 @@ class _SliverScrollingPersistentHeader extends _SliverPersistentHeaderRenderObje
}
}
// This class exists to work around https://github.com/dart-lang/sdk/issues/31543
abstract class _RenderSliverScrollingPersistentHeader extends RenderSliverScrollingPersistentHeader { }
class _RenderSliverScrollingPersistentHeaderForWidgets extends _RenderSliverScrollingPersistentHeader
class _RenderSliverScrollingPersistentHeaderForWidgets extends RenderSliverScrollingPersistentHeader
with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _SliverPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
......@@ -302,10 +299,7 @@ class _SliverPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectW
}
}
// This class exists to work around https://github.com/dart-lang/sdk/issues/31543
abstract class _RenderSliverPinnedPersistentHeader extends RenderSliverPinnedPersistentHeader { }
class _RenderSliverPinnedPersistentHeaderForWidgets extends _RenderSliverPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _RenderSliverPinnedPersistentHeaderForWidgets extends RenderSliverPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _SliverFloatingPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
const _SliverFloatingPersistentHeader({
......@@ -315,10 +309,7 @@ class _SliverFloatingPersistentHeader extends _SliverPersistentHeaderRenderObjec
@override
_RenderSliverPersistentHeaderForWidgetsMixin createRenderObject(BuildContext context) {
// Not passing this snapConfiguration as a constructor parameter to avoid the
// additional layers added due to https://github.com/dart-lang/sdk/issues/31543
return _RenderSliverFloatingPersistentHeaderForWidgets()
..snapConfiguration = delegate.snapConfiguration;
return _RenderSliverFloatingPersistentHeaderForWidgets(snapConfiguration: delegate.snapConfiguration);
}
@override
......@@ -327,10 +318,12 @@ class _SliverFloatingPersistentHeader extends _SliverPersistentHeaderRenderObjec
}
}
// This class exists to work around https://github.com/dart-lang/sdk/issues/31543
abstract class _RenderSliverFloatingPinnedPersistentHeader extends RenderSliverFloatingPinnedPersistentHeader { }
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets extends _RenderSliverFloatingPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _RenderSliverFloatingPinnedPersistentHeaderForWidgets extends RenderSliverFloatingPinnedPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin {
_RenderSliverFloatingPinnedPersistentHeaderForWidgets({
RenderBox child,
FloatingHeaderSnapConfiguration snapConfiguration,
}) : super(child: child, snapConfiguration: snapConfiguration);
}
class _SliverFloatingPinnedPersistentHeader extends _SliverPersistentHeaderRenderObjectWidget {
const _SliverFloatingPinnedPersistentHeader({
......@@ -340,10 +333,7 @@ class _SliverFloatingPinnedPersistentHeader extends _SliverPersistentHeaderRende
@override
_RenderSliverPersistentHeaderForWidgetsMixin createRenderObject(BuildContext context) {
// Not passing this snapConfiguration as a constructor parameter to avoid the
// additional layers added due to https://github.com/dart-lang/sdk/issues/31543
return _RenderSliverFloatingPinnedPersistentHeaderForWidgets()
..snapConfiguration = delegate.snapConfiguration;
return _RenderSliverFloatingPinnedPersistentHeaderForWidgets(snapConfiguration: delegate.snapConfiguration);
}
@override
......@@ -352,7 +342,9 @@ class _SliverFloatingPinnedPersistentHeader extends _SliverPersistentHeaderRende
}
}
// This class exists to work around https://github.com/dart-lang/sdk/issues/31543
abstract class _RenderSliverFloatingPersistentHeader extends RenderSliverFloatingPersistentHeader { }
class _RenderSliverFloatingPersistentHeaderForWidgets extends _RenderSliverFloatingPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin { }
class _RenderSliverFloatingPersistentHeaderForWidgets extends RenderSliverFloatingPersistentHeader with _RenderSliverPersistentHeaderForWidgetsMixin {
_RenderSliverFloatingPersistentHeaderForWidgets({
RenderBox child,
FloatingHeaderSnapConfiguration snapConfiguration,
}) : super(child: child, snapConfiguration: snapConfiguration);
}
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