O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Working with Data Types

In this chapter, we will cover the following recipes:

  • Concatenating strings
  • Using regular expressions
  • Strings and Unicode
  • Using complex numbers
  • Creating an enum
  • Flattening a list
  • Generating a random number within a range
  • Retrieving a random element from a list
  • Working with dates and times
  • Improving performance in numerical computations
  • Using SIMD for enhanced performance

Introduction

This chapter is about working with the different data types Dart has to offer. The basic data types available are var (stores any object); num (stores any number type); int, double, String, bool, List (arrays); and Map (associative arrays). All of these data types are declared in the dart:core library. We will talk about strings, random numbers, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required