Your First Flutter App: An App From Scratch

Feb 22 2022 · Dart 2.14.1, Flutter 2.5, Visual Studio Code 1.6

Part 1: Get Started with Flutter

02. Learn About Flutter

Episode complete

Play next episode

Next
About this episode

Leave a rating/review

See forum comments
Cinema mode Mark complete Download course materials
Previous episode: 01. Introduction Next episode: 03. Install Flutter

Notes: 02. Learn About Flutter

Transcript: 02. Learn About Flutter

Ever since the iPhone and the first Android phones were released over a decade ago, the development tools for creating iOS and Android apps have evolved at a rapid pace. Developers for both of the platforms have the constant challenge of keeping up with the software development kit advancements that occur year after year.

In parallel with the maturation of the iOS and Android SDKs, a number of cross-platform toolkits have been developed and utilized to make iOS and Android apps. These cross-platform toolkits have had varying degrees of success. The benefit of a cross-platform tool is that you can target both iOS and Android at the same time from a single code base. So your overall team size can be smaller, and when you add features or fix bugs in your app, the updates go out to both iPhones and Android at the same time.

The downsides for cross-platform toolkits include lower performance than native apps and lack of ability to use the latest and greatest changes in iOS and Android. Performance is usually lower because there is typically some kind of additional layer introduced into your app to make it work on both platforms. Not having the latest and greatest is due to the fact the cross-platform toolkits generally lag in gaining access to new features introduced into the platforms.

Flutter is one of the more recent cross-platform frameworks for mobile development. And Flutter even goes beyond iOS and Android, since you can target your Flutter apps at the web and even desktop platforms like macOS and Linux.

Flutter has all the benefits of other cross-platform tools, especially the fact that you’re targeting multiple platforms from one code base. And, it improves upon most of them thanks to a super-fast rendering engine, so your Flutter apps perform very nearly or exactly as smoothly as native apps.

In addition, Flutter features are generally speaking independent of native features, since you use Flutter’s own type of user interface elements, called widgets, in creating a UI. And Flutter has the ability to work with native code, so you can integrate your Flutter app with native features when needed.

The decision on whether to learn Flutter or native development depends a lot on your background.

If you’re a lone developer or have a small team, and none of you have iOS and Android experience, Flutter is a great way to be able to learn one tool and build apps for both iOS and Android.

If you already have iOS or Android experience, Flutter is a way you can learn to target the other platform while still being able to target the platform you’re alert experienced with.

If you’re building a small to medium sized app, and don’t need all the latest bells and whistles in iOS or Android but you definitely need an app for both iOS and Android, Flutter is a fantastic choice. On the other hand, if you have a large development team due to the nature of your audience and/or you need features only really available in the native SDKs, Flutter may not be the right choice.

Flutter 1.0 was released in late 2018, and had been in a beta mode for a while before that. Flutter was created and is maintained by Google, and Google uses it in a number of their own apps. Other companies like EBay, Square, Groupon, the New York Times are using Flutter in production.

Flutter itself is a framework that is written in C++. When you debug your app, it is deployed to a virtual machine. This enables you to hot reload an app without having to do a recompile. For instance, if you change the name of a text field, you’ll instantly see that change on your device or simulator.

When it comes time to deploy, Flutter actually compiles your app to native code with exception if you are deploying to the web. This means, you get native app performance on mobile and desktop versus creating an app in something like a web container such Electron.

Being that Flutter apps are compiled to both Android and iOS, you must wonder about the app language. Remember, Flutter is its own framework so you don’t write code for Android, you write code for Flutter which compiles your code to the Android platform.

Flutter apps are written using the Dart programming language. Dart is a mature language, and was originally created in 2011 as a web programming language. As a language, Dart is similar in many ways to other common mobile development languages like Java, Swift and Kotlin.

It includes many safety features and uses a modern approach that helps to streamline your code when compared to more verbose languages. If you’re already familiar with a language like Swift or Kotlin, you’ll have no trouble picking up Dart.

As for the user interface elements, Flutter actually recreates each element inside the framework. This means, when you create a user interface, Flutter is able to quickly generate it versus deferring to the host platform, making it fast during rendering. That said, Flutter does allow your dart to interface with native code as well so you can access native libraries as needed. You can do this by writing your own code or including a package that provides that functionality for you.

Ok, with that background out of the way, it’s time to install a Flutter development environment so we can start building our first Flutter app!