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

Commit

Permalink
adds itemAspectRatio to the GridView (#65)
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Peres França <[email protected]>
  • Loading branch information
Tiagoperes authored Feb 4, 2022
1 parent ae52d35 commit 29ec1d3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import br.com.zup.beagle.widget.ui.GridViewDirection.VERTICAL
* used as a suffix in the component ids within the Widget.
* @param spanCount The number of columns or rows in the grid.
* @param direction define the grid direction.
* @param itemAspectRatio only valid for Flutter. This sets the aspect ratio of the items in the grid. If left in
* blank, the items will be squares (itemAspectRatio = 1). The Flutter GridView doesn't accept items with arbitrary
* size.
*/
data class GridView constructor(
override val context: Context? = null,
Expand All @@ -51,6 +54,7 @@ data class GridView constructor(
val key: String? = null,
val spanCount: Int? = null,
val direction: GridViewDirection? = VERTICAL,
val itemAspectRatio: Double? = null,
) : Widget(), ContextComponent

/**
Expand Down

0 comments on commit 29ec1d3

Please sign in to comment.