Skip to Content
Beginning Flutter
book

Beginning Flutter

by Marco L. Napoli
October 2019
Beginner
528 pages
12h 37m
English
Wrox
Content preview from Beginning Flutter

3Learning Dart Basics

WHAT YOU WILL LEARN IN THIS CHAPTER

  • Why you use Dart
  • How to comment code
  • How to use the top‐level main() function
  • How to reference variables such as numbers, strings, Booleans, lists, maps, and runes
  • How common flow statements (such as if, for, while, and the ternary operator), loops, and switch and case work
  • How functions are used to group reusable logic
  • How to use the import statement for external packages, libraries or classes
  • How to create classes
  • How to use asynchronous programming to avoid blocking the user interface

Dart is the foundation of learning to develop Flutter projects. In this chapter, you'll start understanding Dart's basic structure. In future chapters, you'll create apps that implement these concepts. All the sample code is in the ch3_dart_basics folder. (In the sample code, don't worry about how it's laid out; just take a look so you can see how Dart code is written. Tap the floating action button located on the bottom right to see log results.)

WHY USE DART?

Before you can start developing Flutter apps, you need to understand the programming language used, namely, Dart. Google created Dart and uses it internally with some of its big products such as Google AdWords. Made available publicly in 2011, Dart is used to build mobile, web, and server applications. Dart is productive, fast, portable, approachable, and most of all reactive.

Dart is an object‐oriented programming (OOP) language, has a class‐based style, and uses a C‐style ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Flutter in Motion

Flutter in Motion

Scott Cornell
Flutter for Beginners

Flutter for Beginners

Alessandro Biessek
Flutter in 7 Days

Flutter in 7 Days

Aman Malhotra

Publisher Resources

ISBN: 9781119550822Purchase book