Flutter in Action
eBook - ePub

Flutter in Action

Eric Windmill

Compartir libro
  1. 368 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Flutter in Action

Eric Windmill

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Flutter in Action un PDF/ePUB en línea?
Sí, puedes acceder a Flutter in Action de Eric Windmill en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming Mobile Devices. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Editorial
Manning
Año
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...

Índice