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

Tools and techniques available for responsive and adaptive design

Flutter provides different tools and techniques for developing responsive and adaptive design. Like CSS, Flutter also provides media query objects with details regarding device size, orientation, pixel density, and so on. Like Android, we can decide to build different layouts based on screen size and orientation if we choose to. In this section, we will learn about those tools and techniques. There are basically two things we need to make designs responsive and adaptive: the viewport size and the platform or device that it’s running on. Flutter provides ways to get this information. Apart from tools to provide this information, Flutter by default provides various widgets that allow you to lay out your design in a way that adapts to the changing viewport.

First, let’s talk about the MediaQuery (https://api.flutter.dev/flutter/widgets/MediaQuery-class.html) object. Flutter provides the MediaQuery object...