How do you create a dynamic GridView in Flutter?
Flutter – Build Items of GridView Dynamically
To generate items in a GridView programmatically, use GridView. builder() constructor to create GridView. This constructor allows us to specify an item builder function, via itemBuilder property, with the context and index of item as parameters.