flutter_app_size_reducer library
A command-line tool to analyze and reduce Flutter app size by managing assets and dependencies.
This package provides functionality to:
- Analyze app assets and identify unused or large files
- Clean unused assets safely
- Optimize large assets to reduce app size
- Configure behavior through a YAML file
Example:
import 'package:flutter_app_size_reducer/flutter_app_size_reducer.dart';
void main() async {
// Initialize configuration
await FlutterAppSizeReducer.init();
// Analyze assets
final results = await FlutterAppSizeReducer.analyze();
// Clean unused assets
await FlutterAppSizeReducer.clean(dryRun: true);
// Optimize large assets
await FlutterAppSizeReducer.optimize(quality: 80);
}
Classes
- AnalyseCommand
- Command to run various analyses on the Flutter project
- AnalyzeDependenciesCommand
- Command to analyze dependencies
- AppSizeConfig
- Configuration model for flutter_app_size_reducer
- AssetConfig
- Asset analysis configuration
- BaseCommand
- Base class for all commands in the flutter_app_size_reducer CLI.
- BuildConfig
- Build analysis configuration
- CleanCommand
- CodeConfig
- Code analysis configuration
- ConfigLoader
- Configuration loader and manager
- DependencyAnalysisResult
- Result of dependency analysis
- DependencyAnalyzer
- Service for analyzing dependencies in a Flutter/Dart project.
- DependencyConfig
- Dependency analysis configuration
- FlutterAppSizeReducer
- The main class for the Flutter App Size Reducer package.
- InitCommand
- Command to initialize the configuration file
- PackageInfo
- Package information from pub.dev
- ReportingConfig
- Reporting configuration
Exceptions / Errors
- ConfigException
- Configuration exception