Skip to content

Instantly share code, notes, and snippets.

@adamlofts
Created August 29, 2018 12:32
Show Gist options
  • Save adamlofts/bd9c9e1ec5e198786ac0c28fea2795ef to your computer and use it in GitHub Desktop.
Save adamlofts/bd9c9e1ec5e198786ac0c28fea2795ef to your computer and use it in GitHub Desktop.
Casting sublists
import "dart:convert";
void main() {
dynamic a = json.decode("[[1]]");
List<List<int>> b = (a as List).cast<List<int>>();
List<int> c = b[0].cast<int>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment