Skip to content

Commit

Permalink
adds itemAspectRatio to the GridView (#838)
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Peres França <tiago.franca@zup.com.br>
  • Loading branch information
Tiagoperes committed Feb 4, 2022
1 parent a117de5 commit 1e9c8e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions content/en/api/components/layout/gridview.md
Expand Up @@ -27,6 +27,7 @@ This is how this component is structured:
| scrollEndThreshold | Int | | Defines the percentage scrolled from the list to trigger `onScrollEnd`. |
| iteratorName | String | | It is the context identifier for each cell. |
| key | String | | Points to a unique value present in each item of the `dataSource` to be used as a suffix in the ids of the template components. |
| itemAspectRatio | Double | | 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. |

### GridViewDirection

Expand Down
3 changes: 2 additions & 1 deletion content/pt/api/components/layout/gridview.md
Expand Up @@ -22,11 +22,12 @@ A sua estrutura é representada como mostrado abaixo:
| onInit | List&lt;[Action]({{< ref path="/api/actions" lang="pt" >}})&gt; | | Lista de ações a serem executadas assim que o componente é exibido. |
| dataSource | [Bind]({{< ref path="/api/context#binding" lang="pt" >}})&lt;List&lt;Any&gt;&gt; || Expressão que aponta para uma lista de valores usados para popular o componete. |
| templates |List&lt;[ServerDrivenComponent]({{< ref path="/api/components" lang="pt" >}})&gt; || Representa um array de template, onde cada template corresponde a uma celula na lista através de um `ServerDrivenComponent`. |
| isScrollIndicatorVisible | Bool | | Define se a barra de scroll é visivel.|
| isScrollIndicatorVisible | Bool | | Define se a barra de scroll é visível.|
| onScrollEnd | List&lt;[Action]({{< ref path="/api/actions" lang="pt" >}})&gt; | | Lista de ações executadas quando o GridView chega ao fim. |
| scrollEndThreshold | Int | | Define a porcentagem rolada do GridView para disparar o `onScrollEnd`. |
| iteratorName | String | | É o identificador do contexto de cada célula. |
| key | String | | Aponta para um valor único presente em cada item do `dataSource` para ser usado como um sufixo nos ids dos componentes do template. |
| itemAspectRatio | Double | | válido apenas para o Flutter. Define o aspect ratio (proporção) dos itens na grade. Se deixado em branco, os itens serão quadrados (itemAspectRatio = 1). O GridView do Flutter não aceita itens com largura e/ou altura específicos |

### GridViewDirection

Expand Down

0 comments on commit 1e9c8e0

Please sign in to comment.