A Dart console application to analyze Flutter files and cache analyzed results for faster future access.
- Analyze Flutter Files: Parse and analyze Flutter project files to extract useful information.
- Caching: Store analysis results to speed up subsequent analyses.
- Command Line Interface: Simple CLI for easy use and integration.
- Dart SDK (tested on 3.4.3)
- Flutter (tested on 3.22.0)
The easiest method is using the pre-packed in release page. Simply download the (latest.tar.gz
)[https://github.com/haitr/flutter_clone/releases/download/clone_latest/latest.tar.gz] and unpack in your repo.
curl -L -o latest.tar.gz https://github.com/haitr/flutter_clone/releases/download/clone_latest/latest.tar.gz
tar -xvzf latest.tar.gz
Clone only necessart parts of this repository via sparse checkout feature.
The desired directory should be under Git control. The target can be your own flutter project or created via flutter create
.
git remote add origin https://github.com/haitr/flutter_clone.git
git config core.sparseCheckout true
echo "clone" >> .git/info/sparse-checkout
git pull origin main
Then use pub get
to fetch required packages.
cd clone
dart pub get
Simply run the following command line with default arguments. See --help
for more information.
cd clone
dart run prepare
Make your own implementation generateWrapper
(and afterGenerated
is optional) for generating from Flutter analyzed results. See the example rxflutter wrapper implementation for more details.
Note:
- If
flutter
cannot be found, try to remove.dart_tool
directory anddart pub run
again to re-address theflutter
package.
dart run clone -o ../lib
See --help
for more information.
After generated, modify .gitignore
in order to exclude clone codes (if needed). See the example .gitignore for more details.