Skip to content

Commit

Permalink
Merge pull request #11 from TatsuUkraine/render-object-type-definition
Browse files Browse the repository at this point in the history
fixed updateRenderObject type definitions
  • Loading branch information
TatsuUkraine authored Jul 22, 2019
2 parents 33b3244 + f343ebb commit 3458664
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/render.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class StickyListItemRenderObject<I> extends RenderStack {
}

bool get _scrollDirectionVertical =>
[AxisDirection.up, AxisDirection.down].contains(_scrollable.axisDirection);
[AxisDirection.up, AxisDirection.down].contains(scrollable.axisDirection);

bool get _alignmentStart {
if (_scrollDirectionVertical) {
Expand Down
15 changes: 8 additions & 7 deletions lib/widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -406,14 +406,15 @@ class StickyListItem<I> extends Stack {

@override
@mustCallSuper
void updateRenderObject(
BuildContext context, StickyListItemRenderObject<I> renderObject) {
void updateRenderObject(BuildContext context, RenderStack renderObject) {
super.updateRenderObject(context, renderObject);

renderObject
..scrollable = _getScrollableState(context)
..itemIndex = itemIndex
..streamSink = streamSink
..minOffsetProvider = minOffsetProvider;
if (renderObject is StickyListItemRenderObject<I>) {
renderObject
..scrollable = _getScrollableState(context)
..itemIndex = itemIndex
..streamSink = streamSink
..minOffsetProvider = minOffsetProvider;
}
}
}

0 comments on commit 3458664

Please sign in to comment.