当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
19 Star 122 Fork 134

OpenHarmony-SIG/flutter_packages
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Flutter Migrate

Overview

This is a tool that helps migrate legacy Flutter projects generated with old version of Flutter to modern Flutter templates. This allows old apps to access new features, update key dependenices and prevent slow bitrot of projects over time without domain knowledge of individual platforms like Android and iOS.

Prerequisites

This tool supports migrating apps generated with Flutter 1.0.0 and newer. However, projects generated with older versions of Flutter (beta, alpha, etc) may still be compatible with this tool, but results may vary and official support will not be provided.

Projects that contain heavy modifications to the project's platform directories (eg, android/, ios/, linux/) may result in many conflicts.

Currently, only full Flutter apps are supported. This tool will not work properly with plugins, or add-to-app Flutter apps.

The project must be a git repository with no uncommitted changes. Git is used to revert any migrations that are broken.

Usage

To run the tool enter the root directory of your flutter project and run:

dart run <path_to_flutter_migrate_package>/bin/flutter_migrate.dart <subcommand> [parameters]

The core subcommand sequence to use is start, apply.

  • start will generate a migration that will be staged in the migration_staging_directory in your project home. This command may take some time to complete depending on network speed. The generated migration may have conflicts that should be manually resolved or resolved with the resolve-conflicts subcommand.

  • apply will apply staged changes to the actual project. Any merge conflicts should be resolved in the staging directory before applying

These additional commands help you manage and navigate the migration:

  • status Prints the diffs of the staged changes as well as a list of the files with changes. Any files with conflicts will also be highlighted.

  • abandon Abandons the existing migration by deleting the staging directory.

  • resolve-conflicts Wizard that assists in resolving routine conflicts. The wizard will routinely show each conflict where the option to keep the old code, new code, or skip and resolve manually are presented.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony-sig/flutter_packages.git
git@gitee.com:openharmony-sig/flutter_packages.git
openharmony-sig
flutter_packages
flutter_packages
master

搜索帮助