Get immediate access to this and over 1,500+ other videos and books.

Boost your skills with a Beginner subscription. With over 60+ video courses and our core foundational programming books bundled in one subscription, it’s simply the best investment you can make in your development career.

Create a List

Dart’s List documentation: [

Learn how to use lists in Dart to store an ordered list of values.


Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a Professional subscription.

In this episode, you’ll learn about a collection type that you’ll be using in all your programs - the List otherwise known as the array. In dart, a list is synonymous with an array so you can use them interchangeably. For the sake of consistency, I’ll refer to them as Lists, but if you hear or read the word array in any Dart or a Flutter tutorial, just understand it is just a list.

const pastries =
const pastries = [];
const pastries = ["cookie", "cupcake", "donut", "pie"];
const List<String> pastries = ["cookie", "cupcake", "donut", "pie"];
var pastries = <String>[];
pastries += ['cupcake', 'donut', 'pie', 'brownie'];