Flutter-view is an npm project and requires a working NodeJS installation. Of course you should have a working Flutter install as well.
To install flutter-view, run the following command in your terminal:
npm install -g flutter-view
On a Mac add sudo:
sudo npm install -g flutter-view
Note: you may need to add --unsafe-perm for things to work due to an issue with node-gyp
To test your installation worked, type the flutter-view command in your Terminal or console:
flutter-view - flutter template code generator Converts html and css templates into Flutter view widget code. Please pass a directory to scan. flutter-view -h for help.
If you got the above text, your installation was succesfull.
Flutter-view has an optional Dart tooling library. It allows you to use the reactive, assign and life-cycle tags.
To install it, add the following dependency to your project pubspec.yaml file:
Then perform a flutter packages get to pull in the new dependency.
Note: for the latest version, check the flutter-view-tools pub page.
To import the library in Dart:
To import the library in a Pug file: