file_migration_tool

A Dart CLI tool to help migrate Flutter projects easily by handling dependencies, copying lib/ and assets/ folders, and updating pubspec.yaml.

✨ Features

  • 📦 Dependency Migration
    • Merge dependencies from an old Flutter project (--merge)
    • Rewrite dependencies with the old project’s ones (--rewrite)
  • 📂 Code Migration
    • Copy the entire lib/ folder (--copy-lib)
  • 🎨 Assets Migration
    • Copy the entire assets/ folder (--copy-assets)

📥 Installation

Activate globally from pub.dev:

dart pub global activate file_migration_tool

🚀 Usage

Run the tool inside your new Flutter project directory.

file_migration_tool --path <OLD_PROJECT_PATH> [options]

Options

flags functionality
--path, -p Path to the old Flutter project (required)
--merge Merge dependencies from the old project into the new one
- --rewrite Rewrite dependencies with the old project’s dependencies
--copy-lib Replace the lib/ folder with the one from the old project
--copy-assets Copy the assets/ folder from the old project
--help, -h Show usage information

Example Usage

Merge dependencies and copy lib folder

file_migration_tool --path ../old_project --merge --copy-lib

Rewrite dependencies and copy assets

file_migration_tool --path ../old_project --rewrite --copy-assets

Full migration

file_migration_tool --path ../old_project --merge --copy-lib --copy-assets

📝 Changelog

See CHANGELOG.md for details.

👨‍💻 Credits

Developed by Santosh Varma Addala

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.