Flutter For Web
Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase.
The Flutter SDK, an editor, and the Chrome browser. You can use your preferred editor, such as Android Studio or IntelliJ with the Flutter and Dart plugins installed, or Visual Studio Code with the Dart Code and Flutter extensions. You will debug your code using Dart DevTools on Chrome.
If you also want to run this app on a mobile device, you need to do additional setup and configuration.
Enable web support
Web support is in beta, so you must opt in. To manually enable web support, use the following instructions. In a terminal, run these commands:
You only need to run the config
command once. After enabling web support, every Flutter app you create also compiles for the web. In your IDE (under the devices pulldown), or at the command line using flutter devices
, you should now see Chrome and Web server listed. Selecting Chrome automatically starts Chrome when you launch your app. Selecting Web server starts a server that hosts the app so that you can load it from any browser. Use Chrome during development so that you can use Dart DevTools, and use the web server when you want to test your app on other browsers.Restart your Android Studio and then,
Create a simple, Flutter app.
Start a new project give it a name and sdk path,
Finish it, after this process you will see chrome and other browsers titles here
lets run it ;
Congratulations, you successfully completed the Flutter First Web App! You also got a small taste of Dart DevTools, which you can use to debug and profile all Dart and Flutter apps, not just web apps.