slang icon indicating copy to clipboard operation
slang copied to clipboard

Combine lists and enums

Open gregorscholz opened this issue 9 months ago • 3 comments

Motivation I want to use lists from a csv in combination with a custom enum.

E.g: I have multiple sets of instruction with a different number of steps. In code i want to access it like this:

final instructions = t.instructions(context: level);
...
List.generate(instructions.length, (index) => Text(instructions[index])),

gregorscholz avatar May 29 '24 09:05 gregorscholz