Arguments of a constant creation must be constant expressions.
Arguments of a constant creation must be constant expressions.I am new to flutter, I couldnt find the answer anywhere. i am stuck please help. Arguments of a constant creation must be constant expressions. why this error in that line questions[0]. in the image?
2
Answers
array
questions
isconst
, butquestions[0]
is notconst
.to get rid of error you should remove
const
word before Expand.more about const vs final here
When using variables in this way, you should use ‘final’ instead of ‘const’ and you should update your question list like this: