Getting Started with Flutter on Windows

Maneesha Erandi
Aug 31, 2018 · 4 min read
Flutter

Flutter is Google’s mobile app Software development kit for creating high quality native interfaces on iOS and android in record time. Flutter works with existing code which used by developers and organizations around the world. Flutter is free and open source. Flutter’s hot reload and modern reactive framework helps you to develop your app much faster and compose app UIs easily. Flutter lets you to reuse existing Java, Swift, ObjC code and access native features and SDKs on iOS and android.

Flutter has the tools and libraries to help you easily bring your ideas to life on iOS and Android. If you don’t have any mobile development experience, flutter is an easy and fast way to build beautiful mobile apps.

Getting Started

Lets get started with flutter. To install and run flutter, your development environment must meet these minimum requirements in Windows. Your OS should be Windows 7 SP1 or later(64-bit) and available disk space should be 400 MB. Flutter also depends on PowerShell 5.0 or newer Git for windows being available in your environment.

Download the following installation bundle to get the latest beta release of the flutter SDK

Extract the zip-file and place the contained flutter in the desired installation location for the Flutter SDK.(eg. C:\src\flutter). Double click the flutter_console.bat file inside the flutter directory.

You can also use your regular windows command prompt through adding the flutter to the environment variable PATH. Go to Control Panel > User Accounts > Change my environment variables and if there is an existing entry called Path append the full path to flutter\bin using ; separator. If the entry does not exist then create a new user variable named Path and follow the above steps.

Now reboot windows to fully apply this change

Then run flutter doctor in the flutter console to see if there are any dependencies that you need to install to complete the setup.

Flutter console

If you have installed the beta release of the flutter you may get the following summary.

As you can see here there is one issue found in VS code. You can just ignore that warning considering it is safe and won’t impact the use of flutter or the VS code extension in any way.

If you need to update the flutter version run flutter upgrade

If you haven’t installed android studio yet in your environment, download android studio latest version and install now.(version 3.0 or later) To prepare to run and test your app follow the steps below.

Enable VM acceleration on your machine. Launch Android Studio>Tools>Android>AVD Manager and select Create Virtual Device. (The Android submenu is only present when inside an Android project.) Choose a device definition and select Next. Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended. Under Emulated Performance, select Hardware — GLES 2.0 to enable hardware acceleration. Verify the AVD configuration is correct, and select Finish.

In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.

Configuring the editor

Let’s configure our editor now. Flutter is supported by two plugins. While the ‘Flutter’ plugin powers flutter developer workflows, (running, debugging,hot reload) the ‘Dart’ plugin offers code analysis(code validation, code completions). To install these start android studio and follow the steps below.

  • Open plugin preferences (File>Settings>Plugins)
  • Select Browse repositories > select the Flutter plug-in and click install.
  • Click yes when prompted to install the Dart plugin.
  • Click restart when prompted.

To give a test drive to flutter create a new app and run your app.

  • Select File > New Flutter Project
  • Select Flutter application as the project type and click next
  • Enter your project name and go to next.
  • Click Finish when the android studio is done with the SDK installation and create the project.

Now you can test your app with the existing content using the emulator or your android device. You can change the content a little bit and run your first flutter app.

Now you can make a simple change to your code and try the hot reload experience with flutter.

You’ve create your very first app with flutter.

Maneesha Erandi

Written by

GDG SRILANKA

Google Developer Group Sri Lanka is a community driven by technology enthusiasts, it's a Google supported group but totally independent from Google

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade