Created
August 29, 2018 12:32
-
-
Save adamlofts/bd9c9e1ec5e198786ac0c28fea2795ef to your computer and use it in GitHub Desktop.
Casting sublists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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