Home > database >  How to create a general Custom Flutter Widget that renders as many Children Widgets as provided?
How to create a general Custom Flutter Widget that renders as many Children Widgets as provided?

Time:09-09

I want to render as many children as I provide to my Custom Method. So, let's say, I want to create my own Custom Widget that accepts a dynamic number of children to render. In other words, we can also say that I want to create a custom Row component that renders as many children as I provide. Here is an example of what I am trying to achieve is:

I want that in my main.dart, I render this kind of Custom Widget, which renders a number of children Widgets inside it. My idea is to create some kind of widget like that returns an array of childrens like this:

                 NeoText(
                   text: "⚽️Goals: 2",
                 ),
                 NeoText(
                   text: "           
  • Related