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..