Web Application Development with Flutter
Flutter 2.0 is now live and the creation of the web application using Flutter is now fully supported. In this blog post, we are going to create a web application using Flutter and Navigator 2.0.
Create Web Application Project
For creating the web application using you need to install 2.0 or a later version of the Flutter. You check the version of the dart and Flutter using the below command.
flutter --version
Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (2 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3
You can follow the steps mention on flutter.dev getting started page to configure the web application. For this post, I am going to create a simple web application that will show the route name in the browser as we change the view in the apps. Let's give the project a name web navigator demo.
Step1:- Create a Web Application using Android Studio
Open the Android Studio and tab on File -> New Flutter Project It will open the below Window as per the latest android studio version 4.2.1
Choose Flutter App and tab on next:-
If you want to create only for the Web then untick the Android and iOS option in the above window and give the name to project and tab on Finish. It will create a project with basic code in it.
For testing the web application just select the browser and tab on run, first time it will take some time to complete the compilation and then launch the application in the separate Chrome tab.
How to remove the # in the Url of the web application in Flutter
For removing the # from the URL pattern we have two options.
Option 1: Configure the URL strategy as advised in the Flutter document
Add the following in the pubspec.yaml file and set the path into your main.dart file before the runApp().
dependencies:
flutter:
sdk: flutter
flutter_web_plugins:
sdk: flutter
void main() {
setUrlStrategy(PathUrlStrategy());
runApp(MyApp());
}
Option2: If you don't want to use the flutter_web_plugin then add the url_strategy package and add the below code in main.dart file before runApp() like given below.
void main() {
// Here we set the URL strategy for our web app.
// It is safe to call this function when running on mobile or desktop as well.
setPathUrlStrategy();
runApp(MyApp());
}
Thanks for visiting the page, will continue on this Web application and the next post will share the routing of the web application with Navigator 2.0
Buen trabajo, esta es informaciĆ³n esencial que usted comparte. Esta informaciĆ³n es significativa y muy importante para que podamos aumentar nuestro conocimiento al respecto. Siempre sigue compartiendo este tipo de informaciĆ³n. Gracias una vez mĆ”s por compartirlo. APLICACIONES MOBILES
ReplyDeleteAndroid Mobile App Design Agency. We Design Android Apps That Leave A Lasting Impression. Designing Android apps is one of our specialties For more details call now!@ +91-120-4273676.
ReplyDeleteVisit-
android mobile app development company
I just need to say this is a well-informed article which you have shared here about hoodies.web development company in pune It is an engaging and gainful article for us. Continue imparting this sort of info, Thanks to you.
ReplyDeleteThanks for your post. It's very helpful post for us. You can also visit web development company in dubai for more Victor Steel related information. I would like to thanks for sharing this article here.
ReplyDeleteYou wrote this post very carefully.Web Development Ontario The amount of information is stunning and also a gainful article for us. Keep sharing this kind of articles, Thank you.
ReplyDeleteYou wrote this post very carefully.Web Development Services The amount of information is stunning and also a gainful article for us. Keep sharing this kind of articles, Thank you.
ReplyDeleteThanks for sharing this article here about the Web & Technology. Your article is very informative and I will share it with my other friends as the information is really very useful. Keep sharing your excellent work.Social Media Marketing Services USA site.
ReplyDeleteYou wrote this post very carefully. The amount of information is stunning and also a gainful article for us. Keep sharing this kind of articles,web agency Jakarta Thank you.
ReplyDeleteI will be honest it is the most useful tip I have read till date. Thanks for putting all this together.
ReplyDeleteI am really positive using your thoughts and knowledge will help me to improve my flutter app development .
Great work. Keep doing great work for us. Loved it
I read the above article and I got some knowledge from your article. It's actually great and useful data for us. Thanks for share it.Logo Design Services in Fort St John
ReplyDeleteI read your post and got it quite informative. I couldn't find any knowledge on this matter prior to. I would like to thanks for sharing this article here. iOS App Development Company
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThanks for publishing such excellent knowledge. You are doing such a good job. This info is very helpful for everyone. Keep it up. Thanks. Read more info about design sprint process in India
ReplyDeleteYou have shared a lot of information in this article. I would like to express my gratitude to everyone who contributed to this useful article. Keep posting. app development company dubai
ReplyDeleteContent is a website's most crucial component. Your website is little more than an advertising without content, making it ineffective for online marketing. Any marketing expert who builds websites should constantly aim to provide users with an online resource. Best web design agency in vizag
ReplyDeleteThe most popular websites on the internet have the most material, despite how obvious it may sound.
Whatever your business or organisation offers, your main objective should be to empower your customers rather than just trying to sell them anything; that will happen in due course. By demonstrating that you care about their interests, you give them a reason to come back, which raises the possibility that they will make a purchase or many purchases.
Writing a post is really important for the growth of your websites. Thanks for sharing amazing tips about DIY Credit Repair Software. Following these steps will transform the standard of your post for sure.
ReplyDeleteYou are giving such interesting information. It is great and significant information for us, I genuinely savored the experience of figuring out it. Thankful to you for sharing an article like this.Website Designer Bakersfield, CA
ReplyDeleteGreat idea man thanks for keeping it up all the time. I am very happy to see your standard about Web Hosting For Environmental Permits. Really I appreciate you continuing your work.
ReplyDeleteAmazing content!
ReplyDeleteThanks for sharing this informative blog. Flutter has really made the mobile app development easy. You can also visit flutter companies to know the list of best companies who are masters in flutter app development.
keep sharing content like this!
I like your article & will always be coming frequently to read more of your post. Thanks very much for your post once more.
ReplyDeleteFlutter Mobile App Development Company
Its useful for us thanks for sharing
ReplyDeleteAI Development Company
Blockchain Development Company
Partner with JPLoft, a top DeFi Development Company, to transform traditional financial services into secure, transparent, and low-cost decentralized systems. Our blockchain expertise ensures top-quality DeFi solutions, including wallets, tokens, exchanges, dApps, and smart contracts. Achieve digital success and industry leadership with our innovative DeFi services, enhancing transparency and trust through smart contracts and blockchain technology.
ReplyDelete