SlideShare a Scribd company logo
www.bacancytechnology.com
Google’s UI library- Flutter, was initially
developed to build native performant
mobile applications. Nonetheless, Flutter
isn’t limited to just mobile applications; it
has been working proactively to use the
single codebase for iOS, Android, and
Desktop. Are you passionate about Web
Development? You should definitely try out
Flutter for Web then!
In this guide, we will learn about Flutter for
Web and build a small demo for the same.
Without further ado, let’s get started with
Flutter Web development!
What is
Flutter for
Web?
Flutter’s web support helps you
develop complex standalone web
applications, graphically rich and
interactive content to reach end-users
on a broad variety of devices.
Flutter for Web support offers a
delivery model based on browsers for
the existing Flutter mobile
applications.
How does
Flutter for
Web work?
Flutter renders web apps the same way
as it will render your android/iOS apps,
i.e., Flutter Web will convert your
project to native code (HTML, CSS, JS)
when you wish to deploy. Now, keep in
mind that Flutter Web creates Single
Page Web Applications! You can
definitely have multi-pages, but when
the Flutter framework converts the web
app into the native language, there will
only be one HTML file, i.e., index.html.
So how do we have multiple pages? The
answer to this question is pretty simple.
If we have a closer look at how
Navigator works, we will observe that it
works on the Stack data structure.
Hence, Flutter for Web is a single page,
but it pushes multiple pages on that
same single native page.
How is the
performance
for Flutter
Web, and how
is it different?
Flutter Web works pretty smooth
compared to native as it creates only a
single-page application and hence
creates less load on the browser. Though
we can say that Flutter Web is
improving, its performance is not upto
the mark.
With Flutter, you can create some great
animations very easily compared to
native, hence making your web app
more beautiful.
Flutter Web directly supports installing
your website as a standalone
application (Web-App) for which you
need to code, if in native, separately.
Flutter, as it is a cross-platform
framework, can add some platform-
specific code without any configuration
changes.
How to run
your existing
project on
Flutter Web?
Flutter Web is now on the stable
channel from Flutter 2.0!
Nevertheless, if you are not working on
Flutter 2.0, you can still use it by
running the below commands:
flutter channel beta
flutter upgrade
flutter config --enable-web
flutter create .
If you are already on Flutter 2.0 but
have never run your old project on the
Web, you can run the following set of
commands:
flutter config --enable-web
flutter create
Once the commands are successfully
executed, your project is ready to set
fire on the Web! You will be able to see a
Web folder in your project directory.
Now, to run your project on the Web,
simply select Chrome or Edge as your
device and click Run.
How to create
a new app
with Web
support?
When we create our new project with
Flutter 2.0, web support is already
enabled with new projects.
But if, for some reason, it’s not enabled,
you can run the following commands:
Now Web has been enabled in your
project, and you can run it directly.
flutter config --enable-web
flutter create
Some key
points you
must
consider
when using
Flutter Web!
Flutter Web creates a Single Page App!
As users can open your website in any
screen size now, you need to make it
responsive.
Many packages support the web, but
always check the supported platforms
before coding.
If you are from a web development
background and if you feel like making
any changes in native code, you are
highly welcomed to do so. You can
change the native code the same way we
can change it for Android and iOS.
When you want to deploy your web app,
you can simply run:
When you are working with Flutter Web,
you need to keep few points in mind:
flutter build web
And you will get a folder web in your
project directory that contains native codes,
including index.html
Quick Read: :Flutter for App Development
Tips and
Tricks to
make your
web app
responsive!
The best way to make your web app
responsive is to use MediaQuery to get
the height and width of the screen, and
based on that; you can assign font size.
Many other packages help you to make
your app responsive. Some of the most
useful packages are
➢ responsive_framework
➢ flutter_screenutil
Let’s make a
small
responsive
web app for
all screen
sizes.
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: HomePage(),
);
}
}
class HomePage extends StatefulWidget {
const HomePage({Key? key}) : super(key:
key);
@override
_HomePageState createState() =>
_HomePageState();
}
}
Create a new project and delete all code
available in main.dart
Paste the following code in main.dart:
class _HomePageState extends
State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: MediaQuery.of(context).size.height
- 100.0,
width: MediaQuery.of(context).size.width -
100.0,
color: Colors.orange,
child: Text(
'Responsive Text',
style: TextStyle(fontSize:
MediaQuery.of(context).size.width / 10),
),
),
);
}
class _HomePageState extends
State<HomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: MediaQuery.of(context).size.height
- 100.0,
width: MediaQuery.of(context).size.width -
100.0,
color: Colors.orange,
child: Text(
'Responsive Text',
style: TextStyle(fontSize:
MediaQuery.of(context).size.width / 10),
),
),
);
}
The code is pretty simple. There’s one
Container whose height and width are
being maintained using MediaQuery.
We have Text as its child whose fontSize
is maintained using MediaQuery. Now,
you can check whether this project is
responsive or not by simply increasing
and decreasing the size of your browser!
You can find the entire source code, clone
the Github Repository and run it on your
system.
Conclusion
Flutter for Web Apps are Single Page
Apps.
Flutter renders web apps the same as it
renders Flutter Android or iOS apps by
converting dart code into native code.
We need to check whether a particular
package has Web Support before using it
in our project.
Always make your Web App responsive
as users can open it in any screen size.
Bacancy has dedicated and enthusiastic
Flutter developers enriched with
fundamental and advanced knowledge. If
you’re looking for a helping hand for your
Flutter application, contact us and hire
Flutter developers.
Thank You
www.bacancytechnology.com

More Related Content

What's hot

Flutter
FlutterFlutter
Flutter
Mohit Sharma
 
What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?
MohammadHussain595488
 
Flutter
FlutterFlutter
Cross platform app development with flutter
Cross platform app development with flutterCross platform app development with flutter
Cross platform app development with flutter
Hwan Jo
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
Vishnu Suresh
 
Build beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutterBuild beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutter
RobertLe30
 
Flutter
FlutterFlutter
Hello Flutter
Hello FlutterHello Flutter
Hello Flutter
rihannakedy
 
Google flutter and why does it matter
Google flutter and why does it matterGoogle flutter and why does it matter
Google flutter and why does it matter
Ahmed Abu Eldahab
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDK
digitaljoni
 
Writing Reusable Web Components with jQuery and jQuery UI
Writing Reusable Web Components with jQuery and jQuery UIWriting Reusable Web Components with jQuery and jQuery UI
Writing Reusable Web Components with jQuery and jQuery UI
Ynon Perek
 
The magic of flutter
The magic of flutterThe magic of flutter
The magic of flutter
Shady Selim
 
Flutter Festival - Intro Session
Flutter Festival - Intro SessionFlutter Festival - Intro Session
Flutter Festival - Intro Session
Google Developer Students Club NIT Silchar
 
Flutter
FlutterFlutter
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
SheilaJimenezMorejon
 
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
Frederik Schweiger
 
Flutter vs react native head to toe comparison [2021 edition]
Flutter vs react native  head to toe comparison [2021 edition]Flutter vs react native  head to toe comparison [2021 edition]
Flutter vs react native head to toe comparison [2021 edition]
Katy Slemon
 
Build responsive applications with google flutter
Build responsive applications with  google flutterBuild responsive applications with  google flutter
Build responsive applications with google flutter
Ahmed Abu Eldahab
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
9 series
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
DSCIIITLucknow
 

What's hot (20)

Flutter
FlutterFlutter
Flutter
 
What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?What and Why Flutter? What is a Widget in Flutter?
What and Why Flutter? What is a Widget in Flutter?
 
Flutter
FlutterFlutter
Flutter
 
Cross platform app development with flutter
Cross platform app development with flutterCross platform app development with flutter
Cross platform app development with flutter
 
Flutter workshop
Flutter workshopFlutter workshop
Flutter workshop
 
Build beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutterBuild beautiful native apps in record time with flutter
Build beautiful native apps in record time with flutter
 
Flutter
FlutterFlutter
Flutter
 
Hello Flutter
Hello FlutterHello Flutter
Hello Flutter
 
Google flutter and why does it matter
Google flutter and why does it matterGoogle flutter and why does it matter
Google flutter and why does it matter
 
Intro to Flutter SDK
Intro to Flutter SDKIntro to Flutter SDK
Intro to Flutter SDK
 
Writing Reusable Web Components with jQuery and jQuery UI
Writing Reusable Web Components with jQuery and jQuery UIWriting Reusable Web Components with jQuery and jQuery UI
Writing Reusable Web Components with jQuery and jQuery UI
 
The magic of flutter
The magic of flutterThe magic of flutter
The magic of flutter
 
Flutter Festival - Intro Session
Flutter Festival - Intro SessionFlutter Festival - Intro Session
Flutter Festival - Intro Session
 
Flutter
FlutterFlutter
Flutter
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 
flutter.school #HelloWorld
flutter.school #HelloWorldflutter.school #HelloWorld
flutter.school #HelloWorld
 
Flutter vs react native head to toe comparison [2021 edition]
Flutter vs react native  head to toe comparison [2021 edition]Flutter vs react native  head to toe comparison [2021 edition]
Flutter vs react native head to toe comparison [2021 edition]
 
Build responsive applications with google flutter
Build responsive applications with  google flutterBuild responsive applications with  google flutter
Build responsive applications with google flutter
 
Flutter: Future of App Development
Flutter: Future of App DevelopmentFlutter: Future of App Development
Flutter: Future of App Development
 
DSC IIITL Flutter Workshop
DSC IIITL Flutter WorkshopDSC IIITL Flutter Workshop
DSC IIITL Flutter Workshop
 

Similar to Everything about flutter web development

Build run first web application using flutter for web
Build run first web application using flutter for webBuild run first web application using flutter for web
Build run first web application using flutter for web
Concetto Labs
 
Complete guide to flutter app development
Complete guide to flutter app developmentComplete guide to flutter app development
Complete guide to flutter app development
Concetto Labs
 
dot net
dot netdot net
dot net
sambhajimeher
 
Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .
Techugo
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
Hemant Sarthak
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
Joseph Labrecque
 
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdfAsp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
Integrated IT Solutions
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
Toma Velev
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
Randy Connolly
 
10 Mobile Application Framework Must Know to Launch New App
10 Mobile Application Framework Must Know to Launch New App10 Mobile Application Framework Must Know to Launch New App
10 Mobile Application Framework Must Know to Launch New App
Sonitek International
 
Top mobile app development frameworks to consider in 2021
Top mobile app development frameworks to consider in 2021Top mobile app development frameworks to consider in 2021
Top mobile app development frameworks to consider in 2021
Katy Slemon
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf
PhanithLIM
 
Asp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdfAsp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdf
Integrated IT Solutions
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
Troy Miles
 
Amazing vue.js projects that are open source and free.
Amazing vue.js projects that are open source and free.Amazing vue.js projects that are open source and free.
Amazing vue.js projects that are open source and free.
Katy Slemon
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 
Blazor Full-Stack
Blazor Full-StackBlazor Full-Stack
Blazor Full-Stack
Ed Charbeneau
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
Vineeth N Krishnan
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
Steve Drucker
 

Similar to Everything about flutter web development (20)

Build run first web application using flutter for web
Build run first web application using flutter for webBuild run first web application using flutter for web
Build run first web application using flutter for web
 
Complete guide to flutter app development
Complete guide to flutter app developmentComplete guide to flutter app development
Complete guide to flutter app development
 
dot net
dot netdot net
dot net
 
Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .Flutter App Development- Why Should You Choose It .
Flutter App Development- Why Should You Choose It .
 
Ecommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project CodingEcommerce Mini Project / Group Project Coding
Ecommerce Mini Project / Group Project Coding
 
Getting Acquainted with PhoneGap
Getting Acquainted with PhoneGapGetting Acquainted with PhoneGap
Getting Acquainted with PhoneGap
 
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdfAsp Net Vs Vue JS Which One You Should Choose for Development.pdf
Asp Net Vs Vue JS Which One You Should Choose for Development.pdf
 
Flutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - textFlutter vs Java Graphical User Interface Frameworks - text
Flutter vs Java Graphical User Interface Frameworks - text
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
10 Mobile Application Framework Must Know to Launch New App
10 Mobile Application Framework Must Know to Launch New App10 Mobile Application Framework Must Know to Launch New App
10 Mobile Application Framework Must Know to Launch New App
 
Top mobile app development frameworks to consider in 2021
Top mobile app development frameworks to consider in 2021Top mobile app development frameworks to consider in 2021
Top mobile app development frameworks to consider in 2021
 
Basic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdfBasic Introduction Flutter Framework.pdf
Basic Introduction Flutter Framework.pdf
 
Asp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdfAsp.net Vs Vue.js.pdf
Asp.net Vs Vue.js.pdf
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Phone gap
Phone gapPhone gap
Phone gap
 
Amazing vue.js projects that are open source and free.
Amazing vue.js projects that are open source and free.Amazing vue.js projects that are open source and free.
Amazing vue.js projects that are open source and free.
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 
Blazor Full-Stack
Blazor Full-StackBlazor Full-Stack
Blazor Full-Stack
 
HTML5 introduction for beginners
HTML5 introduction for beginnersHTML5 introduction for beginners
HTML5 introduction for beginners
 
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha TouchJQuery Mobile vs Appcelerator Titanium vs Sencha Touch
JQuery Mobile vs Appcelerator Titanium vs Sencha Touch
 

More from Katy Slemon

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
Katy Slemon
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
Katy Slemon
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
Katy Slemon
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
Katy Slemon
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
Katy Slemon
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
Katy Slemon
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
Katy Slemon
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
Katy Slemon
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Katy Slemon
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
Katy Slemon
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
Katy Slemon
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
Katy Slemon
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
Katy Slemon
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
Katy Slemon
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
Katy Slemon
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Katy Slemon
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
Katy Slemon
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
Katy Slemon
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
Katy Slemon
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
Katy Slemon
 

More from Katy Slemon (20)

React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdfReact Alternatives Frameworks- Lightweight Javascript Libraries.pdf
React Alternatives Frameworks- Lightweight Javascript Libraries.pdf
 
Data Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdfData Science Use Cases in Retail & Healthcare Industries.pdf
Data Science Use Cases in Retail & Healthcare Industries.pdf
 
How Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdfHow Much Does It Cost To Hire Golang Developer.pdf
How Much Does It Cost To Hire Golang Developer.pdf
 
What’s New in Flutter 3.pdf
What’s New in Flutter 3.pdfWhat’s New in Flutter 3.pdf
What’s New in Flutter 3.pdf
 
Why Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdfWhy Use Ruby On Rails.pdf
Why Use Ruby On Rails.pdf
 
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdfHow Much Does It Cost To Hire Full Stack Developer In 2022.pdf
How Much Does It Cost To Hire Full Stack Developer In 2022.pdf
 
How to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdfHow to Implement Middleware Pipeline in VueJS.pdf
How to Implement Middleware Pipeline in VueJS.pdf
 
How to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdfHow to Build Laravel Package Using Composer.pdf
How to Build Laravel Package Using Composer.pdf
 
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdfSure Shot Ways To Improve And Scale Your Node js Performance.pdf
Sure Shot Ways To Improve And Scale Your Node js Performance.pdf
 
How to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdfHow to Develop Slack Bot Using Golang.pdf
How to Develop Slack Bot Using Golang.pdf
 
IoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdfIoT Based Battery Management System in Electric Vehicles.pdf
IoT Based Battery Management System in Electric Vehicles.pdf
 
Understanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdfUnderstanding Flexbox Layout in React Native.pdf
Understanding Flexbox Layout in React Native.pdf
 
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdfThe Ultimate Guide to Laravel Performance Optimization in 2022.pdf
The Ultimate Guide to Laravel Performance Optimization in 2022.pdf
 
New Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdfNew Features in iOS 15 and Swift 5.5.pdf
New Features in iOS 15 and Swift 5.5.pdf
 
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdfHow to Hire & Manage Dedicated Team For Your Next Product Development.pdf
How to Hire & Manage Dedicated Team For Your Next Product Development.pdf
 
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdfChoose the Right Battery Management System for Lithium Ion Batteries.pdf
Choose the Right Battery Management System for Lithium Ion Batteries.pdf
 
Flutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdfFlutter Performance Tuning Best Practices From the Pros.pdf
Flutter Performance Tuning Best Practices From the Pros.pdf
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
 
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdfHow to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
How to Set Up and Send Mails Using SendGrid in NodeJs App.pdf
 
Ruby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdfRuby On Rails Performance Tuning Guide.pdf
Ruby On Rails Performance Tuning Guide.pdf
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 

Everything about flutter web development

  • 2. Google’s UI library- Flutter, was initially developed to build native performant mobile applications. Nonetheless, Flutter isn’t limited to just mobile applications; it has been working proactively to use the single codebase for iOS, Android, and Desktop. Are you passionate about Web Development? You should definitely try out Flutter for Web then! In this guide, we will learn about Flutter for Web and build a small demo for the same. Without further ado, let’s get started with Flutter Web development!
  • 4. Flutter’s web support helps you develop complex standalone web applications, graphically rich and interactive content to reach end-users on a broad variety of devices. Flutter for Web support offers a delivery model based on browsers for the existing Flutter mobile applications.
  • 6. Flutter renders web apps the same way as it will render your android/iOS apps, i.e., Flutter Web will convert your project to native code (HTML, CSS, JS) when you wish to deploy. Now, keep in mind that Flutter Web creates Single Page Web Applications! You can definitely have multi-pages, but when the Flutter framework converts the web app into the native language, there will only be one HTML file, i.e., index.html. So how do we have multiple pages? The answer to this question is pretty simple. If we have a closer look at how Navigator works, we will observe that it works on the Stack data structure. Hence, Flutter for Web is a single page, but it pushes multiple pages on that same single native page.
  • 7.
  • 8. How is the performance for Flutter Web, and how is it different?
  • 9. Flutter Web works pretty smooth compared to native as it creates only a single-page application and hence creates less load on the browser. Though we can say that Flutter Web is improving, its performance is not upto the mark. With Flutter, you can create some great animations very easily compared to native, hence making your web app more beautiful. Flutter Web directly supports installing your website as a standalone application (Web-App) for which you need to code, if in native, separately. Flutter, as it is a cross-platform framework, can add some platform- specific code without any configuration changes.
  • 10. How to run your existing project on Flutter Web?
  • 11. Flutter Web is now on the stable channel from Flutter 2.0! Nevertheless, if you are not working on Flutter 2.0, you can still use it by running the below commands: flutter channel beta flutter upgrade flutter config --enable-web flutter create . If you are already on Flutter 2.0 but have never run your old project on the Web, you can run the following set of commands: flutter config --enable-web flutter create
  • 12. Once the commands are successfully executed, your project is ready to set fire on the Web! You will be able to see a Web folder in your project directory. Now, to run your project on the Web, simply select Chrome or Edge as your device and click Run.
  • 13. How to create a new app with Web support?
  • 14. When we create our new project with Flutter 2.0, web support is already enabled with new projects. But if, for some reason, it’s not enabled, you can run the following commands: Now Web has been enabled in your project, and you can run it directly. flutter config --enable-web flutter create
  • 16. Flutter Web creates a Single Page App! As users can open your website in any screen size now, you need to make it responsive. Many packages support the web, but always check the supported platforms before coding. If you are from a web development background and if you feel like making any changes in native code, you are highly welcomed to do so. You can change the native code the same way we can change it for Android and iOS. When you want to deploy your web app, you can simply run: When you are working with Flutter Web, you need to keep few points in mind:
  • 17. flutter build web And you will get a folder web in your project directory that contains native codes, including index.html Quick Read: :Flutter for App Development
  • 18. Tips and Tricks to make your web app responsive!
  • 19. The best way to make your web app responsive is to use MediaQuery to get the height and width of the screen, and based on that; you can assign font size. Many other packages help you to make your app responsive. Some of the most useful packages are ➢ responsive_framework ➢ flutter_screenutil
  • 20. Let’s make a small responsive web app for all screen sizes.
  • 21. import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Material App', home: HomePage(), ); } } class HomePage extends StatefulWidget { const HomePage({Key? key}) : super(key: key); @override _HomePageState createState() => _HomePageState(); } } Create a new project and delete all code available in main.dart Paste the following code in main.dart:
  • 22. class _HomePageState extends State<HomePage> { @override Widget build(BuildContext context) { return Scaffold( body: Container( height: MediaQuery.of(context).size.height - 100.0, width: MediaQuery.of(context).size.width - 100.0, color: Colors.orange, child: Text( 'Responsive Text', style: TextStyle(fontSize: MediaQuery.of(context).size.width / 10), ), ), ); }
  • 23. class _HomePageState extends State<HomePage> { @override Widget build(BuildContext context) { return Scaffold( body: Container( height: MediaQuery.of(context).size.height - 100.0, width: MediaQuery.of(context).size.width - 100.0, color: Colors.orange, child: Text( 'Responsive Text', style: TextStyle(fontSize: MediaQuery.of(context).size.width / 10), ), ), ); }
  • 24. The code is pretty simple. There’s one Container whose height and width are being maintained using MediaQuery. We have Text as its child whose fontSize is maintained using MediaQuery. Now, you can check whether this project is responsive or not by simply increasing and decreasing the size of your browser! You can find the entire source code, clone the Github Repository and run it on your system.
  • 26. Flutter for Web Apps are Single Page Apps. Flutter renders web apps the same as it renders Flutter Android or iOS apps by converting dart code into native code. We need to check whether a particular package has Web Support before using it in our project. Always make your Web App responsive as users can open it in any screen size. Bacancy has dedicated and enthusiastic Flutter developers enriched with fundamental and advanced knowledge. If you’re looking for a helping hand for your Flutter application, contact us and hire Flutter developers.