Skip to content

Instantly share code, notes, and snippets.

@codingpizza
Created October 2, 2019 18:32
Adding a element to a list
List numberList = List.of({1,2,3,4,5});
var newNumber = 6;
numberList.add(newNumber);
print(numberList);
// Result: [1,2,3,4,5,6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment