how-to-build-a-native-cross-platform-project-with-flutter
How to build a native cross platform project with Flutter
Import dart:html and dart:io in the same project!
TLDR The final source here.
Up to now you have been able to create projects with Flutter that run on iOS/Android, Web and Desktop but only sharing pure dart plugins.
Flutter launched Flutter for web at Google I/O and was a temporary fork that required you to change imports from import 'package:flutter/material.dart'; to import 'package:flutter_web/material.dart';.
As you can image this was really difficult for a code base as you had to create a fork and change the imports. This also meant that you could not import any package that needed on a path or depended on flutter. The time as come and the merge is complete. Now you no longer need to change the imports!
![]()
You can use any plugin now, have a debugger, create new flutter projects with the web folder added, web plugins, and so much more..
Disclaimer
More from rodydavis/skills
flutter-control-and-screenshot
Guide on how to control a Flutter app using flutter_driver via MCP and capture screenshots.
197install-flutter-from-git
Install Flutter SDK via git clone and configure for all platforms
56how-to-build-a-webrtc-signal-server-with-pocketbase
Learn how to build a simple WebRTC video call application using PocketBase as a signaling server, enabling peer-to-peer communication with SQLite on the server and realtime updates via Server Sent Events.
55how-to-do-full-text-search-with-sqlite
Learn how to supercharge your SQLite databases with full-text search capabilities using the built-in fts5 extension, enabling efficient and powerful querying with the `MATCH` keyword.
55flutter-fastlane-one-click-beta
Deploy your Flutter app to the App Store and Google Play with ease using this step-by-step guide covering installation, project setup, Fastlane integration, and automated deployments with Automator.
55using-fastlane-in-flutter-and-ci
Automate Flutter app builds and deployments to both the App Store and Google Play using Fastlane with this step-by-step guide.
53