asset_opt 1.0.2 copy "asset_opt: ^1.0.2" to clipboard
asset_opt: ^1.0.2 copied to clipboard

A Flutter/Dart tool for analyzing and optimizing project assets. Provides detailed analysis, recommendations, and automatic optimizations for images.

example/main.dart

import 'package:asset_opt/asset_opt.dart';

void main() async {
  // Initialize services
  final fileService = FileService();
  final imageService = ImageService();
  final analysisState = AnalysisState();

  // Create analyzer
  final analyzer = AnalyzeCommand(
    fileService,
    imageService,
    analysisState,
  );

  // Run analysis
  final analysis = await analyzer.execute('./');

  // Check for issues
  if (analysis.hasIssues()) {
    print('Found optimization opportunities:');
    for (final asset in analysis.assets) {
      if (asset.issues.isNotEmpty) {
        print('${asset.info.name}:');
        for (final issue in asset.issues) {
          print('  - ${issue.message}');
        }
      }
    }
  }
}
11
likes
130
points
111
downloads

Publisher

verified publisheraikins.xyz

Weekly Downloads

A Flutter/Dart tool for analyzing and optimizing project assets. Provides detailed analysis, recommendations, and automatic optimizations for images.

Repository (GitHub)
View/report issues
Contributing

Topics

#cli #assets #optimization #flutter #images

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

args, image, path, yaml

More

Packages that depend on asset_opt