If there is an inherited variable called id, I would like to display widget.index and ": problem number" together on one line on the screen.
ex) problem(text) 1(list variable)
problem(text) 2(list variable)
Is there a way to get a variable in a list like the one above and display it on the screen along with text?
CodePudding user response:
You can use $ in a string
String someString = 'problem id: ${problem(text)} and widget index :${widget.index}';