Flutter for Beginners
eBook - ePub

Flutter for Beginners

An introductory guide to building cross-platform mobile applications with Flutter 2.5 and Dart, 2nd Edition

Thomas Bailey, Alessandro Biessek

Share book
  1. 370 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Flutter for Beginners

An introductory guide to building cross-platform mobile applications with Flutter 2.5 and Dart, 2nd Edition

Thomas Bailey, Alessandro Biessek

Book details
Book preview
Table of contents
Citations

About This Book

Develop the real-world experience you need to build and launch your own Flutter apps with this full-color guide

Key Features

  • Get up to speed with the basics of Dart programming and delve into Flutter development
  • Learn about Flutter widgets, plugins, and animations to create a high-quality app user experience
  • Package and deploy your Flutter apps to achieve native-like performance

Book Description

There have been many attempts at creating frameworks that are truly cross-platform, but most struggle to create a native-like experience at high performance levels. Flutter achieves this with an elegant design and a wealth of third-party plugins, making it the future of mobile app development. If you are a mobile developer who wants to create rich and expressive native apps with the latest Google Flutter framework, this book is for you.This book will guide you through developing your first app from scratch all the way to production release. Starting with the setup of your development environment, you'll learn about your app's UI design and responding to user input via Flutter widgets, manage app navigation and screen transitions, and create widget animations. You'll then explore the rich set of third party-plugins, including Firebase and Google Maps, and get to grips with testing and debugging. Finally, you'll get up to speed with releasing your app to mobile stores and the web.By the end of this Flutter book, you'll have gained the confidence to create, edit, test, and release a full Flutter app on your own.

What you will learn

  • Explore the core concepts of the Flutter framework and how it is used for cross-platform development
  • Understand the fundamentals of the Dart programming language
  • Work with Flutter widgets and learn the concepts of stateful and stateless widgets
  • Add animation to your app using animated widgets and advanced animations techniques
  • Master the complete development lifecycle, including testing and debugging
  • Investigate the app release process to both mobile stores and the web

Who this book is for

This book is for developers looking to learn Google's revolutionary framework Flutter from scratch. No prior knowledge of Flutter or Dart is required.

]]>

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Flutter for Beginners an online PDF/ePUB?
Yes, you can access Flutter for Beginners by Thomas Bailey, Alessandro Biessek in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Mobile Devices. We have over one million books available in our catalogue for you to explore.

Information

Section 1: Introduction to Flutter and Dart

In this section, you will gain an understanding of the core Flutter framework, explore the basics of the Dart language, learn how to set up your own environment, and finally learn how to get started with it.
This section comprises the following chapters:
  • Chapter 1, An Introduction to Flutter
  • Chapter 2, An Introduction to Dart
  • Chapter 3, Flutter versus Other Frameworks
  • Chapter 4 Classes and Constructs

Chapter 1: An Introduction to Flutter

In this chapter, you will learn the basics of the Flutter framework, the reasons for its creation, and what the future of Flutter may hold. You will learn about the thriving Flutter community, how it is contributing to the continued evolution of Flutter, and how and why Flutter has grown so quickly in the last couple of years. Along the way, you will see how to make (and run!) your first Flutter project, experience the excellent Flutter documentation, and see how Flutter is designed to work across a range of platforms including iOS, Android, Web, Windows, and Mac.
The following topics will be covered in this chapter:
  • What is Flutter?
  • Hello Flutter – a first glimpse of Flutter
  • Widgets, widgets, everywhere
  • Building and running Flutter

Technical requirements

In this chapter, we will create, build, and run a Flutter application. To do this, you will need to set up your system so that it is capable of doing this.
Specifically, you will need to set up your system to have the following:
  • A Flutter software development kit (SDK) installed and added to your PATH
  • An integrated development environment (IDE) where you can view and edit Flutter code
  • Android Studio and/or Xcode so that you can use the Android and iOS development tools and iOS simulators/Android emulators
The chapter will give you some guidance on how to set up your system, but as you will discover, the Flutter documentation is excellent and includes very accurate and up-to-date getting started guides: https://flutter.dev/docs/get-started/install.
Feel free to set up your system now or at the specific points required during the chapter.
You can find the source code for this chapter on GitHub at https://github.com/PacktPublishing/Flutter-for-Beginners-Second-Edition/tree/main/hello_world/lib/chapter_01.

What is Flutter?

Since the advent of the Apple App Store (and subsequently the Google Play Store), there has been a way for organizations to share programs with mobile users in a very controlled and managed way. Much like web pages on the internet, mobile apps have proliferated to encompass all aspects of our life. And much like web pages, over the years, developers have iteratively discovered and learned the best ways to create reliable, scalable, and intuitive mobile apps.
As developers have learned to work within the mobile ecosystem, they have followed similar design patterns and framework ideas as were created to deal with the web ecosystem. Much like the complications of developing code for multiple browsers, in the mobile ecosystem, there has been the challenge of developing code that can work on both iOS and Android devices, with the dream always being to have one code base that works on all devices and even the web.
Flutter is a framework that is the culmination of this learning. Like most other frameworks, developers use a programming language specified by the framework, and structure their code in a way that aligns with the needs of the framework so that ultimately, the developer creates the least amount of "boilerplate" code and can focus on their business needs. Examples of "boilerplate" code would be how to manage touch input, how to connect to the internet, and how to package the app code to work with the App Store, Play Store, or web hosting service.
Flutter is a very new framework, and this means that it does not have a big section of the mobile development market yet, but this is changing, and the outlook for the next few years is highly positive.
When choosing a new programming language or framework, it is hugely important to developers and software companies that what they have chosen has certain key aspects that will ensure it is easy to pick up and that it has a bright future. Investing time and money into learning a new solution, and then developing a code base and development processes around that language and framework, is incredibly expensive. If that solution becomes outdated after a short period of time, there is poor support and documentation, there are a lack of new developers available to take your product forward, or the solution has scaling issues or usability problems, then that investment is wasted. Let's look at some of the aspects that suggest Flutter may be a good long-term investment.

Backed by Google

Flutter, and the Dart programming language it depends on, were created by Google, and although they are open source, they continue to be backed by Google. This ensures the framework has all the tools it needs to succeed in the community, with support from the Google team, presence at big events such as Google I/O, and investment in continuous improvements in the code base.
From the launch of the first stable release during the Flutter Live Event at the end of 2018, the growth of Flutter is evident:
  • More than 200 million users of Flutter apps
  • More than 50,000 Flutter apps on the Play Store
  • Nearly 500,000 developers
  • The 18th most popular software repository on GitHub
Let's look at some of the reasons why Flutter has become so popular.

Fuchsia OS and Flutter

It's not a secret anymore that Google has been working on a new operating system called Fuchsia OS, which has been rumored to be a potential future replacement for the Android OS. One thing to pay attention to is that Fuchsia OS may be a universal Google operating system that runs on more than just mobile phones, and this would directly affect Flutter adoption. This is because Flutter will be the first method of developing mobile apps for the new Fuchsia OS, and, not only this, Fuchsia uses Flutter as its UI render...

Table of contents