flutter_restore library

Static compatibility scanner for legacy Flutter projects.

The public library exposes the scanner, compatibility rules, result models, report renderers, and CLI entry point used by the flutter_restore executable.

Classes

AgpCompileSdkLimit
Maximum compile SDK known to be supported by an AGP range.
AgpCompileSdkRule
Checks whether compileSdk is supported by the detected AGP version.
AgpGradleRange
Supported Gradle version range for a line of Android Gradle Plugin releases.
AgpGradleRule
Checks whether Android Gradle Plugin and Gradle versions are compatible.
AgpJavaRequirement
Minimum Java version required by an Android Gradle Plugin range.
AgpJavaRule
Checks whether Android Gradle Plugin has the Java version it requires.
AndroidSnapshot
Android-specific facts discovered from a Flutter project.
CompatibilityData
Compatibility tables used by the built-in rules.
CompatibilityRule
Base class for a static compatibility rule.
DependencyLockConsistencyRule
Checks that pubspec.yaml and pubspec.lock describe the same dependency set.
DependencyScanner
Reads pubspec.yaml and pubspec.lock and merges them into one dependency snapshot without running package resolution.
DependencySdkCompatibilityRule
Checks declared and locked SDK constraints against each other and against known per-package Dart SDK requirements.
DependencySnapshot
Static snapshot of a project's Dart/Flutter dependencies.
DesktopTargetPlatformOverrideRule
Detects obsolete Linux/Windows TargetPlatform override workarounds.
Finding
A single issue, risk, or note produced by a compatibility rule.
FlutterAndroidMigrationRule
Detects old Android Flutter integration patterns.
GradleJavaSupport
Maximum Java version supported by a Gradle range.
IosAppDelegateLegacyRule
Detects legacy or custom iOS AppDelegate integration patterns.
IosAppDelegateSnapshot
Facts detected in an iOS AppDelegate source file.
IosBuildConfigurationDeploymentTarget
iOS deployment target declared for one Xcode build configuration.
IosDependencyManagementRule
Detects risky or inconsistent iOS dependency management setups.
IosDeploymentTargetRule
Checks iOS deployment targets against the supported Flutter baseline.
IosLegacyBuildSetting
Legacy iOS build setting detected in a project file.
IosPluginDeploymentTarget
iOS deployment target declared by a native plugin.
IosScanner
Reads iOS runner files and produces an IosSnapshot.
IosSceneLifecycleRule
Checks whether iOS scene lifecycle files are internally consistent.
IosSnapshot
iOS-specific facts discovered from a Flutter project.
IosXcodeProjectConsistencyRule
Detects stale Flutter references in iOS Xcode project files.
JavaGradleRule
Checks whether the Gradle version is compatible with modern Java.
JsonReportRenderer
Renders scan results as stable, indented JSON.
LinuxCmakeRule
Checks Linux CMake setup against Flutter's generated runner baseline.
LinuxProjectStructureRule
Checks Linux desktop target structure.
PackageConflict
A known pair of package version ranges that cannot be used together.
PackageConflictRule
Checks the dependency set against known package-to-package conflicts.
PackageDependency
One project dependency merged from pubspec.yaml and pubspec.lock.
PackageNote
A deprecation or discontinuation note for a known package.
PackageNoteRule
Reports known deprecation and discontinuation notes for packages present in the dependency set.
PackageSdkRequirement
Minimum Dart SDK required by a known package version range.
PlainReportRenderer
Renders scan results as a human-readable terminal report.
PlatformSnapshot
Basic facts discovered for a non-mobile Flutter target platform.
ProjectScanner
Reads a Flutter project from disk and builds a static compatibility snapshot.
ProjectSnapshot
Complete static snapshot of a Flutter project.
ReportRenderer
Base class for scan report renderers.
RequiredFilesRule
Checks for project files required for reliable restoration analysis.
RuleRunner
Runs a set of compatibility rules against a project snapshot.
WebBootstrapRule
Checks Flutter web initialization files for deprecated bootstrap patterns.
WebProjectStructureRule
Checks web target structure.
WebServiceWorkerRule
Checks Flutter web service worker patterns deprecated by current tooling.
WindowsCmakeRule
Checks Windows CMake setup against Flutter's generated runner baseline.
WindowsDarkTitleBarRule
Checks Windows dark title bar support introduced for Flutter 3.7 runners.
WindowsProjectStructureRule
Checks Windows desktop target structure.
WindowsRunLoopRule
Detects Windows runners that predate Flutter 2.5's message pump migration.
WindowsShowWindowRule
Checks Windows first-frame redraw migration from Flutter 3.13.
WindowsVersionInfoRule
Checks whether Windows executable version metadata follows Flutter tooling.

Enums

AppDelegateLifecycleStyle
AppDelegate lifecycle style detected in the iOS runner.
ScanPlatform
Flutter target platform selected for scan output and rule evaluation.
Severity
Severity assigned to a compatibility finding.
UISceneLifecycleStatus
Status of the iOS UIScene lifecycle configuration.

Constants

allScanPlatforms → const Set<ScanPlatform>
All concrete platforms supported by the scanner.

Functions

parseScanPlatforms(String value) Set<ScanPlatform>?
Parses a scan platform argument. all returns every supported platform.
runFlutterRestore(List<String> arguments, {required IOSink stdout, required IOSink stderr}) Future<int>
Runs the flutter_restore command-line interface.