Skip to content

Commit

Permalink
Merge pull request #27 from TatsuUkraine/release-2.0.0
Browse files Browse the repository at this point in the history
Release 2.0.0
  • Loading branch information
TatsuUkraine committed Jul 1, 2020
2 parents 051f125 + 9dcdcd6 commit 4afc395
Show file tree
Hide file tree
Showing 12 changed files with 819 additions and 262 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## [2.0.0] - 2020-07-02

**Features**
- refactor sticky item layout calculation
- split alignment param on main and cross axis alignment
- added padding property to `InfiniteListItem`
- added relative positioning for header
[#19](https://github.com/TatsuUkraine/flutter_sticky_infinite_list/issues/19)

**Release contains breaking changes, see MIGRATION.md for more details**

## [1.3.0] - 2020-04-28

**Features**
Expand Down
47 changes: 47 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Migration guide

## Migration From v1.x.x to v2.x.x

### Child count params

In `InfiniteList` next params for max child count was renamed:
- `minChildCount` was renamed to `negChildCount` and now it works with
positive numbers
- `maxChildCount` was renamed to `posChildCount` and, as before, it
works with positive numbers

### Header alignment

Param `headerAlignment` in `InfiniteListItem` was replaced with 2
params: `mainAxisAlignment` and `crossAxisAlignment`

Main axis is placed with scroll direction: vertical or horizontal.

With `mainAxisAlignment: HeaderMainAxisAlignment.start` and vertical
scroll header will stick to the top edge, with horizontal scroll - to
the left edge. Similar with `mainAxisAlignment:
HeaderMainAxisAlignment.end` - bottom and right side respectively.

`crossAxisAlignment` doesn't affect stick side. It just places header to
the left or right side for the vertical scroll, and top or bottom - for
horizontal scroll.

New parameter was added for relative positioning: `positionAxis` which
defines what direction should be used during layout - column or row.

### List item layout

Comparing to v1, v2 by default uses relative positioning.

To make header overlay content use constructor `overlay`. It's available
in both `InfiniteListItem` and `StickyListItem` widgets.

### Initial header render

In default constructor param `initialHeaderBuild` was removed.

Since default constructor uses relative positioning, header is required
to calculate appropriate item size.

`initialHeaderBuild` is still available in `overlay` constructors and
affects header render like it was before in v1.x.x
Loading

0 comments on commit 4afc395

Please sign in to comment.