There is a global boolean kIsWeb which can tell you whether or not the app was compiled to run on the web. import ‘package:flutter/foundation. dart’ show kIsWeb; if (kIsWeb) { // running on the web! }
Read moreHow do I enable web support on Flutter?
This page covers the following steps for getting started with web support: Configure the flutter tool for web support. Create a new project with web support. Run a new project with web support.
Read more