Good evening,
I would like to know if it is possible to put a create button in the application and when users click on it, it should create a button next to it that will serve as a storage category.
Thanks in advance
Create a button but imposssible.
2
Answers
Thank you very much.
I am not far from the truth. I have an error: Exception caught by rendering library ═════════════════════════════════ RenderBox was not laid out: RenderSemanticsAnnotations#dd25b relayoutBoundary=up8 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE 'package:flutter/src/rendering/box.dart': Failed assertion: line 1972 pos 12: 'hasSize'
The question explanation it not enough but as I understand :
First you need to store the buttons in the
list
Create the button widget you want to be created, for example:
Then the Widget that will add the new button is
ListView.builder
as you can use the buttons list with it :Then create the method that will add the new widget to the UI:
finally create a static button that when user press on it, it will create the new button :
Full code:
Hope that’s help you !!