warning :this note is for those who knows some basic stuff of flutter
Place the bat file in the build/ folder (same path as the build/web folder) remove_files_for_Fivem.bat (click to download)
Build command: flutter build web --web-renderer canvaskit --no-source-maps && %cd%/build/remove_files_for_Fivem.bat
(Using canvaskit renderer and not to produce src maps file,eventully, the unnecessary files will be automatically deleted by the bat file.) If using the VS Code terminal,type
cmd to switch to cmd .
Just edit the
client_scripts
part andserver_scripts
part ,thefiles
part andui_page
are basically fixed