flutter_release_checker 0.2.2
flutter_release_checker: ^0.2.2 copied to clipboard
A CLI and library that audits your Flutter app's Android, iOS, Firebase, Supabase, security and store readiness, reporting a Production Ready Score via terminal and HTML report.
example/flutter_release_checker_example.dart
// ignore_for_file: avoid_print
//
// Runs flutter_release_checker's checks programmatically against a Flutter
// project and prints a terminal report, mirroring what the
// `flutter_release_checker check` CLI command does under the hood.
//
// Usage:
// dart run example/flutter_release_checker_example.dart <path-to-flutter-project>
//
// If you just want the CLI, you don't need this file at all — this package
// also ships an executable:
// dart pub global activate flutter_release_checker
// cd your_flutter_app
// flutter_release_checker check
import 'package:flutter_release_checker/flutter_release_checker.dart';
Future<void> main(List<String> arguments) async {
final projectPath = arguments.isNotEmpty ? arguments.first : '.';
final FlutterProject project;
try {
project = FlutterProject.at(projectPath);
} on FlutterProjectNotFoundException catch (e) {
print('Error: $e');
return;
}
// Run every registered check (Flutter, Android, iOS, Firebase, Security,
// Store Readiness). Use CheckRegistry.byIds([...]) instead to run a subset.
final results = <CheckResult>[
for (final check in CheckRegistry.all) await check.run(project),
];
final score = const ScoreCalculator().calculate(results);
final report = ReleaseReport(
projectName: project.projectName,
results: results,
score: score,
generatedAt: DateTime.now(),
);
// Colored terminal report — pass colorEnabled: false for plain text.
print(TerminalReporter().render(report));
// A self-contained HTML report you can open in any browser.
final htmlFile = const HtmlReporter().write(
report,
defaultHtmlReportPath(project.root.path),
);
print('HTML report written to ${htmlFile.path}');
if (report.failedChecks.isNotEmpty) {
print('${report.failedChecks.length} check(s) found issues.');
}
}