I have a generated GlobalKey list, and I stucked with this:
final List<GlobalKey> keys = List<GlobalKey>.generate(optionalChars.length, (index) => GlobalKey(debugLabel: "key$index"));
Any way to use it in a list?
Container(
key: index != -1 ? keys[index] : null,
And I got the same error
The following assertion was thrown building Container(bg: BoxDecoration(color: Color(0xffdadada)), constraints: BoxConstraints(w=360.0, h=270.0)): Multiple widgets used the same GlobalKey.
Anyone can help?