A new Flutter project.
React app is the starting point, first create a build of Flutter Web and include this in React app. ReactJs and Flutter env be pre installed before proceeding. During development you can automate these commands, Follow Steps:
- Open
flutterapp
in terminal - Run command
flutter build web
- Copy content of folder
build/web
and Paste inmy-app/public
- Now convert
lib/web/jsScript.dart
tomy-app/public/jsScript.dart
- Run command in
flutterapp
folder,dart compile js -o ../my-app/public/jsScript.js lib/web/jsScript.dart
- Now lets start our app
- Open
my-app
in terminal install dependenciesnpm install
- Launch reactjs app using
npm start