Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

feat: GridView.itemAspectRatio (Flutter) #65

Merged
merged 1 commit into from
Feb 4, 2022

Conversation

Tiagoperes
Copy link
Contributor

@Tiagoperes Tiagoperes commented Feb 4, 2022

Signed-off-by: Tiago Peres França [email protected]

Description and Example

The GridView in Flutter doesn't accept items with arbitrary size, i.e. if the gridview has an item with width and height, this is not used by the gridview to calculate the size of the cell, instead, by default, every item in the gridview is a square. According to the Flutter documentation, we also can't set manually the size of the gridView items, instead, in Flutter, we must use a property called childAscpectRatio, which tells the aspect ratio of each cell.

Unfortunately this is incompatible with the current contract of Beagle's GridView. To not mess too much with this contract (which would require changes in all platforms) and also have a usable GridView in Flutter, I exposed childAscpectRatio as the Beagle property itemAspectRatio. I stated in the API docs that this property is only valid for Flutter.

Docs PR: ZupIT/beagle-docs#838

Checklist

Please, check if these important points are met using [x]:

  • I read the PR Guide and followed the process outlined there for submitting this PR.
  • I avoided breaking changes by not changing public APIs that people rely on.
  • I am willing to follow-up on review comments in a timely manner.
  • I have made the documentation changes or I created an issue explaining how to document this change on Docs issues. Please link the issue here:

Signed-off-by: Tiago Peres França <[email protected]>
@Tiagoperes Tiagoperes merged commit 29ec1d3 into main Feb 4, 2022
@Tiagoperes Tiagoperes deleted the feat/grid-view-aspect-ratio branch February 4, 2022 17:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants