this is the same question as here:
How can I convert this string to list of lists?
but for Dart rather than python. My aim (as in the other question) is to take a string like:
String stringRep = '[[123],[122],[411]]';
And convert it to a List of lists. I can see I would be able to achieve this using one of the methods recommended in answer referenced above, namely:
str = "[[0,0,0],[0,0,1],[1,1,0]]"
strs = str.replace('[','').split('],')
lists = [map(int, s.replace(']','').split(',')) for s in strs]
But wondering if there is a better method in Dart but struggling to fnd any online?