Book Image

Taking Flutter to the Web

By : Damodar Lohani
Book Image

Taking Flutter to the Web

By: Damodar Lohani

Overview of this book

Using a shared codebase in addition to an extensive range of tools in the Flutter ecosystem optimized for browsers, the Flutter framework has expanded to enable you to bring your mobile apps to the web. You’ll find out how web developers can leverage the Flutter framework for web apps with this hands-on guide. Taking Flutter to the Web will help you learn all about the Flutter ecosystem by covering the tools and project structure that allows you to easily integrate Flutter into your web stack. You’ll understand the concepts of cross-platform UI development and how they can be applied to web platforms. As you explore Flutter on the web, you'll become well-versed with using Flutter as an alternative UI platform for building adaptive and responsive designs for web apps. By the end of this Flutter book, you'll have built and deployed a complete Flutter app for the web and have a roadmap ready to target the web for your existing Flutter mobile apps.
Table of Contents (17 chapters)
1
Part 1: Basics of Flutter Web
5
Part 2: Flutter Web under the Hood
9
Part 3: Advanced Concepts

Creating a new Flutter project with Flutter web

In the last chapter, we already created our Flutter project with web support. In this chapter, we will start our project for this book. As before, let’s create our new project:

flutter create flutter_academy

This command will create a new Flutter project, and if you have followed the steps from the previous chapter, you should already have web enabled. This new project should be created with web support.

Now, make sure you can run your project using the following command from your terminal, or by tapping F5 after opening the project in Visual Studio Code:

flutter run -d chrome

As we will have already coded some starter code, copy the files inside chapter2_start/lib to the lib folder of the project you just created. We have some basic widgets already set up here, which we will talk about in the next section.