Skip to content

Feature- Cleanup Files#29

Closed
ff-vivek wants to merge 2 commits into
FlutterFlow:mainfrom
ff-vivek:cleanup-files
Closed

Feature- Cleanup Files#29
ff-vivek wants to merge 2 commits into
FlutterFlow:mainfrom
ff-vivek:cleanup-files

Conversation

@ff-vivek
Copy link
Copy Markdown

I’ve been working on a solution to automatically detect and delete unreferenced files in FlutterFlow projects using flutterflow_cli.

Currently, when renaming/deleting files, FlutterFlow regenerates code but doesn’t remove old files locally, leading to accumulation of unused files in Git repositories. I’ve implemented a DCM-based cleanup script that:
• Finds unreferenced files using DCM.
• Prompts or auto-deletes them based on user preference (--auto-delete flag).
• Ensures efficiency & safety, avoiding accidental deletions.

I’d love to collaborate and see if we can integrate this directly into flutterflow_cli to improve project hygiene for developers. Let me know your thoughts, and I’d be happy to share the implementation details!

1. added cleanup file
2. commented project setup temporary
1. refactored flutterflow_cli.dart to include projectInfo
@tmpsantos tmpsantos self-requested a review February 17, 2025 21:23
@tmpsantos
Copy link
Copy Markdown
Contributor

I do like the idea, but I think it could also be done by running this on the repo:

dart pub add --dev dart_code_linter
dart run dart_code_linter:metrics check-unused-files -d lib

We could document that when synching we will not delete files by default and suggest using dart_code_linter to cleanup unused files.

@TaniaCruzado
Copy link
Copy Markdown

Hola @ff-vivek,

¡Me pareció muy interesante tu trabajo con FlutterFlow y la optimización de archivos en Git!
Soy de Perú y me gustaría poder contactarte para conversar más sobre este tema y contar con tu apoyo.

¿Tienes LinkedIn o un correo donde pueda escribirte?
¡Muchas gracias y espero tu respuesta! 😊

@ff-vivek ff-vivek closed this Feb 24, 2025
@ff-vivek
Copy link
Copy Markdown
Author

Will raise another PR ASAP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants