Your First Dart Application

Learn to write a program for our first Dart application.

We'll cover the following

The main entry point

Every application has some point in its program that serves as the entry point to the application. When an application runs, it starts from that specified entry point. In Dart, the entry point is the main() function. You might be unfamiliar with what a function is at this point; that’s okay. For now, just remember that when you run a Dart program, the compiler looks for the main() function and executes the code written in that function. If main() is not found, you will get an error and your application won’t run. The code you write in main() is encapsulated in curly brackets ({}). Let’s look at the general syntax below.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy