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.

Utilize Initialization Lists

This video was last updated on Jun 28 2022

Understand the basics of initialization lists and how to use them to build your objects.


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.

When we define a constructor in Dart, we define the initialization followed by any code that we want to want run.

class User {
  final int id;
  final String name;
final String uniqueId;
User(, : uniqueId = '$id$name';
User(, : uniqueId = id.toString() + name;
var user = User(42, 'Ray');
User(, : uniqueId = id.toString() + name {