Skip to content

Commit

Permalink
sticky_header: Pass new second type argument to SlottedContainerRende…
Browse files Browse the repository at this point in the history
…rObjectMixin et al.

This is required since flutter/flutter#126108 .

The breakage is a reminder that it'd be good to get our repo added
to Flutter's "customer tests" suite.  Because this isn't a common API
to extend, neither that suite nor Google's internal use of Flutter
had anything affected by this change, which mean that Flutter's
"breaking change" policy treated it as a non-breaking change, the
same as an internal refactoring.

In addition to these required changes, there's a deprecation
of SlottedMultiChildRenderObjectWidgetMixin in favor of an abstract
base class.  We can take care of that in a separate commit.

[greg: wrote new commit message]
  • Loading branch information
samwightt authored and gnprice committed May 23, 2023
1 parent 99c8d10 commit 2f0f469
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/widgets/sticky_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class RenderSliverStickyHeaderList extends RenderSliverList {
enum StickyHeaderSlot { header, content }

class StickyHeader extends RenderObjectWidget
with SlottedMultiChildRenderObjectWidgetMixin<StickyHeaderSlot> {
with SlottedMultiChildRenderObjectWidgetMixin<StickyHeaderSlot, RenderBox> {
StickyHeader(
{super.key,
this.direction = AxisDirection.down,
Expand All @@ -236,14 +236,14 @@ class StickyHeader extends RenderObjectWidget
}

@override
SlottedContainerRenderObjectMixin<StickyHeaderSlot> createRenderObject(
SlottedContainerRenderObjectMixin<StickyHeaderSlot, RenderBox> createRenderObject(
BuildContext context) {
return RenderStickyHeader(direction: direction);
}
}

class RenderStickyHeader extends RenderBox
with SlottedContainerRenderObjectMixin<StickyHeaderSlot> {
with SlottedContainerRenderObjectMixin<StickyHeaderSlot, RenderBox> {
RenderStickyHeader({required AxisDirection direction})
: _direction = direction;

Expand Down

0 comments on commit 2f0f469

Please sign in to comment.