Chapter 2. A brief intro to Dart

This chapter covers

  • Dart’s Hello, World!
  • Anatomy of a Dart program
  • Basic Dart syntax such as control flow, loops, and functions
  • Object-oriented programming in Dart
  • Using I/O Dart libraries

This book is about building mobile apps with Flutter. But you can’t write a Flutter app without learning a bit about the Dart programming language first. The good news is that Dart is also quite easy to pick up. If you’re already comfortable enough with Dart that you understand the following code block, you can skip this chapter:

class CompanyContext extends StateObject { final bool isLoading; String _companyId; CompanyContext({ this.isLoading = false, }); String get companyId => _companyId; void set companyId(String id) ...

Get Flutter in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.