A bash script to re-structuring Flutter app directories from the default structure to screens/services/widgets(SSW) structure.
-
Clone/ download
flutterstruct
bash file from this repository. -
Using terminal, give it execution permission:
chmod +x flutterstruct
-
Add it to $PATH var:
- Create a bin directory in the home:
mkdir ~/bin
- Copy bin file to bin directory:
cp ./flutterstruct ~/bin
- Open this file:
gedit ~/.profile
- Add this line at the end of the file:
export PATH="$PATH:/home/bin"
- Save the file and re-login to the system.
-
Open terminal in the root dir of your flutter app,
e.g you can see lib dir as ./lib
-
Run the script:
flutterstruct