Pragmatic Flutter
eBook - ePub

Pragmatic Flutter

Building Cross-Platform Mobile Apps for Android, iOS, Web & Desktop

Priyanka Tyagi

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

Pragmatic Flutter

Building Cross-Platform Mobile Apps for Android, iOS, Web & Desktop

Priyanka Tyagi

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Have you ever thought of creating beautiful, blazing-fast native apps for iOS and Android from a single codebase? Have you dreamt of taking your native apps to the web and desktop without it costing a fortune? If so, Pragmatic Flutter: Building Cross-Platform Mobile Apps for Android, iOS, Web & Desktop is the right place to start your journey to developing cross-platform apps. Google's Flutter is the brand-new way for developing beautiful, fluid, and blazing-fast cross-platform apps for Android, iOS, web, and desktops (macOS, Linux, Windows).

Google's new Fuchsia OS user interface (UI) is implemented using Flutter as well. Learning to develop mobile apps with Flutter opens the door to multiple devices, form-factors, and platforms using a single codebase. You don't need any prior experience using Dart to follow along in this book; however, it's recommended that readers have some familiarity with writing code using one of the object-oriented programming languages.

Your journey starts with learning to structure and organize the Flutter project to develop apps for multiple platforms. Next, you will explore the fundamentals of Flutter widgets. The journey continues with Flutter's layout widgets while also learning to build responsive layouts. You will get an understanding of organizing and applying themes and styles, handling user input, and gestures. Then you will move on to advanced concepts, such as fetching data over the network and integrating and consuming REST API in your app. You will get hands-on experience on design patterns, data modeling, routing, and navigation for multi-screen apps. When you are finished, you will have a solid foundational knowledge of Flutter that will help you move on to building great and successful mobile apps that can be deployed to Android, iOS, web, and desktop (macOS, Linux, Windows) platforms from a single codebase.

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 Pragmatic Flutter un PDF/ePUB en línea?
Sí, puedes acceder a Pragmatic Flutter de Priyanka Tyagi 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
CRC Press
Año
2021
ISBN
9781000427103

1

Dart Fundamentals

A Quick Reference to Dart 2
Dart programming language is developed by Google. It has been around since 2011. However, it has gained popularity recently since Google announced Flutter software development kit (SDK) for developing cross-platform-applications. Dart aims to help developers build web and mobile applications effectively. It works for building production-ready solutions for client applications as well as for the server-side. Dart has an Ahead-of-Time (AOT) compiler that compiles predictable native code quickly for the target platform. It is optimized to build customized user interfaces natively for multiple platforms. The Dart is a developers-friendly programming language. It is easy for developers coming from different programming language backgrounds to learn Dart without much effort.
The Dart 2 (Announcing Dart 2 Stable and the Dart Web Platform) is the latest version of Dart language including the rewrite of many features, improved performance and productivity. This chapter covers the basics of Dart 2 language syntaxes (Google, 2020) to get started with the journey of building applications using Flutter. A prior understanding of object-oriented programming is needed to follow along with the material. Dart 2 and Dart will be used to infer the Dart 2 programming language in this book. In the upcoming topics, we'll review some of the language features with the help of examples.

THE main FUNCTION

The `main()` function is the entry point for any Dart program. The following code snippet will print “Hello Dart” on the console. Open a ‘Terminal’ at MacOS or its Windows or Linux equivalent. Create a file say ‘hello.dart’, and copy the following code snippet in it.
```
void main() {
print("Hello Dart");
}
```

RUNNING DART PROGRAM

Go back to the ‘Terminal’ and execute the file using `dart hello.dart`. The “Hello Dart” is printed on the console.
```
$ dart hello.dart
Hello Dart
```

VARIABLES & DATA TYPES

In Dart, you can use the `var` keyword to infer the underlying data type. The following code snippet shows declaring variable `data` to hold the numeric value ‘1’.
```
var data = 1;
print(data);
```
The above code snippet will print the ‘1’ on the console. The runtimeType (runtimeType property) property gives the runtime type of the object it's called on. The following code snippet will print the data type of the `data` variable as ‘int’ on the console.
```
var data = 1;
print(data.runtimeType);
```
It's valid for the `data` variable to get reassigned to a value from a different data type.
There's another keyword, `dynamic`, to assign a value to a variable similar ...

Índice