Flutter in Action
eBook - ePub

Flutter in Action

Eric Windmill

Partager le livre
  1. 368 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Flutter in Action

Eric Windmill

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

SummaryIn 2017, consumers downloaded 178 billion apps, and analysts predict growth to 258 billion by 2022. Mobile customers are demanding more—and better—apps, and it's up to developers like you to write them! Flutter, a revolutionary new cross-platform software development kit created by Google, makes it easier than ever to write secure, high-performance native apps for iOS and Android. Flutter apps are blazingly fast because this open source solution compiles your Dart code to platform-specific programs with no JavaScript bridge! Flutter also supports hot reloading to update changes instantly. And thanks to its built-in widgets and rich motion APIs, Flutter's apps are not just highly responsive, they're stunning!Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.About the technologyWith Flutter, you can build mobile applications using a single, feature-rich SDK that includes everything from a rendering engine to a testing environment. Flutter compiles programs written in Google's intuitive Dart language to platform-specific code so your iOS and Android games, utilities, and shopping platforms all run like native Java or Swift apps.About the book Flutter in Action teaches you to build professional-quality mobile applications using the Flutter SDK and the Dart programming language. You'll begin with a quick tour of Dart essentials and then dive into engaging, well-described techniques for building beautiful user interfaces using Flutter's huge collection of built-in widgets. The combination of diagrams, code examples, and annotations makes learning a snap. As you go, you'll appreciate how the author makes easy reading of complex topics like routing, state management, and async programming.What's inside Understanding the Flutter approach to the UI
All the Dart you need to get started
Creating custom animations
Testing and debuggingAbout the readerYou'll need basic web or mobile app development skills.About the author Eric Windmill is a professional Dart developer and a contributor to open-source Flutter projects. His work is featured on the Flutter Showcase page. Table of Contents: PART 1 - MEET FLUTTER1 Š Meet Flutter2 Š A brief intro to Dart3 Š Breaking into FlutterPART 2 - FLUTTER USER INTERACTION, STYLES, AND ANIMATIONS4 Š Flutter UI: Important widgets, themes, and layout5 Š User interaction: Forms and gestures6 Š Pushing pixels: Flutter animations and using the canvasPART 3 - STATE MANAGEMENT AND ASYNCHRONOUS DART7 Š Flutter routing in depth8 Š Flutter state management9 Š Async Dart and Flutter and infinite scrollingPART 4 - BEYOND FOUNDATIONS10 Š Working with data: HTTP, Firestore, and JSON11 Š Testing Flutter apps

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Flutter in Action est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Flutter in Action par Eric Windmill en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Programming Mobile Devices. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Éditeur
Manning
Année
2020
ISBN
9781638356431

Part 1. Meet Flutter

The first section of this book is in three chapters, and it’s meant to prepare you to build full-blown Flutter apps. In particular, this includes three subjects.
First, I’ll introduce all things Flutter in chapter 1. This includes the whos, whats, whys, and hows: how it works, why it’s worth investing in, and the mental model needed to use the SDK. This chapter is largely conceptual and involves little code.
I also devote a chapter to Dart, the programming language that Flutter uses. I like to call Dart Java Lite. And I mean that in a great way. If you’re comfortable with object-oriented and strongly typed languages, you can probably just skim this chapter.
Then, in chapter 3, we’ll explore Flutter itself. This chapter uses a simple Flutter example app to explain how Flutter works, both from the perspective of how you write code, as well as some more explanations of how the engine works. By the end of chapter 3, you’ll be set up, comfortable with the SDK, and ready to start building a Flutter app. If I did a good job, you’ll also understand what’s under the hood.

Chapter 1. Meet Flutter

This chapter covers
  • What is Flutter?
  • What is Dart?
  • Why does Flutter use Dart?
  • When is Flutter the right tool (or the wrong tool)?
  • A brief intro to how Flutter works
Flutter is a mobile SDK, built and open sourced by Google; and at its core, it’s about empowering everyone to build beautiful mobile apps. Whether you come from the world of web development or native mobile development, Flutter makes it easier than ever to create mobile apps in a familiar, simplified way. Flutter is special in that it makes it truly possible to “write once, and deploy everywhere.” As of this writing, Flutter apps will deploy to Android, iOS, and ChromeOS. In the near future, Flutter apps will also run as web apps and desktop apps on all major operating systems.
In short, Flutter is a truly complete SDK for creating applications. It’s a platform that provides everything you need to build applications: rendering engine, UI components, testing frameworks, tooling, router, and many more features. The consequence is that you get to focus on the interesting problems in your app. You can focus specifically on the domain functionality, and everything else is taken care of. The value that Flutter provides is astonishing.
In fact, that’s how I found myself here, writing this book. I had to learn Flutter because of my job, and I loved it from the moment I started. I effectively became a mobile developer overnight, because Flutter felt so familiar to my web development background. (The Flutter team has said that they were influenced by ReactJS.)
Flutter isn’t only about being easy, though. It’s also about control. You can build exceptional mobile apps using Flutter with a shallow knowledge of the framework. But you can also create incredible and unique features, if you so choose, because Flutter exposes everything to the developer.
This is a book about writing a (relatively) small amount of code and getting back a fully featured mobile app that works on iOS and Android. In the grand scheme, mobile app development is new. It can be a pain point for developers and companies alike. But I believe Flutter has changed that (and that’s a hill I’m willing to die on).
This books has one goal: to turn you into a (happy) Flutter (and Dart) developer.

1.1. Why does Flutter use Dart?

Flutter apps are written in the programming language called Dart. I’ll describe Dart in depth throughout the book, but for now, just know that all the code you write in a Flutter app is Dart code. In fact, to us, the mobile developers, Flutter appears to be nothing more than a Dart library.
Dart is also owned and maintained by Google. This may give you pause. There are reasons to be skeptical of this choice: it’s not one of the hot languages of today, few companies use it in production, and the community must be small. What gives? Is Google just using it because it’s Google’s language? I imagine that played a role, but there are practical reasons, too:
  • Dart supports both just-in-time (JIT) compiling and ahead-of-time (AOT) compiling:
    • The AOT compiler changes Dart into efficient native code. This makes Flutter fast (a win for the user and the developer), but it also means that (nearly) the entire framework is written in Dart. For you, the developer, that means you can customize almost everything.
    • Dart’s optional JIT compiling allows hot reloading to exist. Fast development and iteration is a key to the joy of using Flutter.
  • Dart is object-oriented. This makes it easy to write visual user experiences with Dart, with no need for a markup language.
  • Dart is a productive, predictable language. It’s easy to learn, and it feels familiar. Whether you come from a dynamic language or a static language, you can get up and running with ease.
And I think Google owning Dart is an advantage. In the last few years, Dart has made great strides to be a nice language specifically for writing modern UIs. The type system and object orientation make it easy to reason about writing reusable components for the UI. And Dart includes a few functional programming features that make it easier to turn your data into pieces of UI. Finally, asynchronous, stream-based programming features are first-class citizens in Dart. These features are used heavily in reactive programming, which is the paradigm of today.
Lastly, Dart excels at being a language that’s easy to learn. As a coworker of mine said about hiring, “We don’t have to find Dart people, only smart people.”

1.2. On Dart

Besides explaining Flutter in depth, I will also introduce the basics of Dart. Dart is a programming language. And programming languages can be, as it turns out, hard to learn. The fundamentals of Dart are similar to all higher-level languages. You’ll find familiarity in Dart syntax if you’re coming from JavaScript, Java, or any other C-like language. You’ll feel comfortable with Dart’s object-oriented design if you’re coming from Ruby or Python.
Like all languages, though, the devil is in the details (and, as they say, doubly in the bubbly). The joys of Dart and the complexity of writing good Dart code lie not in the syntax, but in the pragmatics.
There’s good news, though. Dart excels at being a “safe” language to learn. Google didn’t set out to create anything innovative with Dart. Google wanted to make a language that was simple and productive and that could be compiled into JavaScript. What Google came up with works well for writing UIs.
The fact that Flutter can compile to JavaScript is less relevan...

Table des matiĂšres