Introducing Dart

An exciting and immersive introduction to learning client side Dart programming
2.5 (1 rating)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
32 students enrolled
Take This Course
  • Lectures 21
  • Length 1 hour
  • Skill Level Beginner Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 8/2015 English

Course Description

As the internet becomes more of an application platform, the need to develop more feature-rich and immersive applications grows! Dart is a fantastic class-based, object-oriented language that pushes back on the idea that JavaScript should have a monopoly on web application development. It can be used both server side (dartVM) and client side (web browser) to build any application from a simple script to a full-blown 3D web game.

Introducing Dart is a joyride of game programming where the user harnesses the power of the Dart programming language. The techniques shown in these videos can easily be applied and expanded upon to create any kind of interactive web application.

We begin by learning how to install the Dart development environment, and how to get started using the Dart Editor. We then walk through building our game step-by-step until we are left with a fully functional game called “Dart Worm”.

At the first step you will be introduced to the Dart SDK and the Dart editor software. This will provide the environment where we will design and develop our main project. Then you will learn how to use Dart to access the elements on a web page (called the DOM). Once these elements are accessed you will be shown how to manipulate them by calling methods, and how to add and remove elements from the DOM dynamically.

As we move on we will be covering specific Dart classes that will help us bring the different components of our game to life. We will learn how to animate our game, keep score, and present the user with controls. Eventually, we will be putting everything we learned together and building our final game.

When you have completed these videos, you will have all of the tools necessary to build and deploy a fully functional web application using the Dart programming language.

About The Author

James Slocum is a Software Developer for TelVue, and an adjunct Computer Science professor at Mercer County Community College. He studied Computer Engineering and Computer Science at the New Jersey Institute of Technology, graduating in 2008. His first article about Dart was featured in the March 2013 (#227) issue of Linux Journal.

What are the requirements?

  • No experience with other programming languages is necessary, although it may help.

What am I going to get from this course?

  • Get up and running with the Dart development environment and Dart Editor
  • Produce clean and reliable codes using classes to organize ideas
  • Handle user events like keyboard presses and mouse movements to change the behaviour of your application.
  • Become more fluent with the core Dart tools such as Pub and Dart2js
  • Combine the power of CSS with Dart to create stunning effects and animations.
  • Use the dartlang API resource to expand on the classes, methods, and functions discussed.
  • Create and deploy visually attractive, interactive, and immersive web applications

Who is the target audience?

  • You will get the most from this video course if you are already familiar with web development technologies such as HTML5 and CSS3.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Getting Started with the Dart Editor

This video will offer the overview of the course.


We want to start programming in Dart. We first need to install the Dart SDK and editor software so that we can begin programming. We can find this software at


Now that we have the editor installed, you need to learn how to start a new project. We will choose file|new project. Then we add a new file to our project, and finally we run our project.


Now that we know how to make a new project, we want to start our Worm project, where we will be doing our work for the rest of the videos.


Before we can start creating a web application, we need to lay out the template HTML and CSS. We will add HTML and CSS to our project so that we can begin adding worms and food on the screen.

Section 2: Interacting with the DOM Using Dart

We need some way to access the HTML objects laid out in the DOM so that we can manipulate them.


Now that we have accessed an element, what are the things we can do with it? How do we change its properties?


We need some way of adding new elements to the DOM, and taking some away. We will explore how we can do this.

Section 3: Putting Some Boogie in the Worm

In our game, the worm needs some food objects on the screen to eat and grow longer. We will be implementing the basic style for our worm's food and testing it with static HTML.


It is not very interesting for the player if the food objects always appear in the same place. So, we will use the dart:math:Random class to generate random positions for our food objects.


As of now, we don't really have a game because nothing is moving. To get things moving, we will be using the Timer class in the dart:async library to trigger periodic events.


Our project is starting to grow, in both size and complexity, and we don't want it to get out of hand. We need to start breaking our parts into classes and utilizing the OOP facilities that are provided by Dart.

Section 4: Reacting to Key Press Events

Right now, we have no way for the user to control the game. We will use the onKeyPress() method provided by the dart:html:Document object to handle key press events and make the DOM react.


Now that we can react to any key being pressed, we need a way to figure out which key was pressed and react differently, depending on the result. To do this, we will expand our callback and use the KeyboardEvent.charcode property to figure out which key was pressed.


Now that we are getting the game controls in place and functional, it is a good time to implement the pause, resume, and reset functionality. We are presenting this here because we will be using these functions when wrapping up the development process in the next section.

Section 5: Putting the Game Together

So far, we have created the individual parts of the game and gotten them animated and under the control of the user. Now we must program the interactions between all the elements.


Now that we know whether the worm intersects with food objects, we need to know whether it goes out of bounds, or runs into itself. We can also set a score that means that the user has won if they achieve it.


Now that our base game is complete and playable, how do we release it to players all over the world? We can compile our game to JavaScript and it can be played on other browsers.

Section 6: Adding Some Flair

We now have our complete basic game, but we want to add some more flair to the game. We can expand our CSS to make our game more presentable.


We have our game over and game winning scenarios, but they are boring. We can use CSS animations to help make these announcements more presentable.


Our game is now complete, but is it really? What else can we do to make it better?

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Packt Publishing, Tech Knowledge in Motion

Over the past ten years Packt Publishing has developed an extensive catalogue of over 2000 books, e-books and video courses aimed at keeping IT professionals ahead of the technology curve. From new takes on established technologies through to the latest guides on emerging platforms, topics and trends – Packt's focus has always been on giving our customers the working knowledge they need to get the job done. Our Udemy courses continue this tradition, bringing you comprehensive yet concise video courses straight from the experts.

Ready to start learning?
Take This Course