0

I am designing a plant tracking app for which I need to render grids, the problem is the fields are uneven and so some grids are rectangular, some are square and some are uneven as well and I need to track each and every plant as a grid cell, and each plant has a different lifecycle and different set of rules for transplantation, germination, fruiting dates, plus each plant's most important rule is the spacing i.e some plants can be spaced at a distance of 60cm from each other but some require 400cm, so based on this data I want to render a cell wherein the size of the grid cell is determined by the plant's spacing and the color should be red after it is planted once, plus I can render the uneven Grids as well.

Is it possible to have such a GridView?

Here's the thing I am trying to achieve but the exception test cases are that it will not be limited to a square or a rectangle. Like in the image I have shown the red marked area, that's the different test cases I would like to cover.

Grid test cases

MadhurJ
  • 33
  • 5
  • Share UI snippet of what you're trying to achieve – Prashant Dec 25 '22 at 15:20
  • You can try using flutter_staggered_grid_view: ^0.6.2 - https://pub.dev/packages/flutter_staggered_grid_view or dynamic_height_grid_view: ^0.0.3 - https://pub.dev/packages/dynamic_height_grid_view to achieve dynamic size gridview – Prashant Dec 25 '22 at 15:21
  • Other libs which can help: https://api.flutter.dev/flutter/material/DataTable-class.html. I use it to render a json too, but without an image which is simpler when you have to adapt widget (image) through Expanded Widget. – barracus Dec 25 '22 at 15:33

0 Answers0