smartpub library
SmartPub - Flutter Dependency Analyzer
A comprehensive library for analyzing, cleaning, and organizing Flutter project dependencies with intelligent categorization.
Classes
- AnalysisConfig
- Dependency analysis configuration
- AnalysisResult
- Analysis result container
- AppConfig
- Application information and metadata
- ApplyResult
- Result of applying dependency changes
- ApplyService
- Service for applying dependency fixes
- BackupInfo
- Information about a backup file
- BackupRestoreResult
- Result returned by BackupService.restoreFromBackup
- BackupService
- Service for managing pubspec.yaml backups
- CategorizationConfig
- Categorization configuration and defaults
- CLIOutput
- CLI output formatter class
- CommandConfig
- CLI command configuration
- DependencyAnalyzer
- Main dependency analyzer class
- DependencyChange
- Represents a change to be made to dependencies
- DependencyInfo
- Information about a single dependency
- DuplicateDependency
- Information about a duplicate dependency
- ExitCodes
- Exit codes for different scenarios
- FileConfig
- File and directory constants
- GemsIntegration
- Package categorization using API with local cache
- GroupedDependencies
- Grouped dependencies data structure
- GroupingService
- Service for grouping dependencies by categories
- InteractiveGroupingService
- Service for interactive package categorization
- InteractiveService
- Service for handling interactive user prompts
- MissingDependency
- Information about a missing dependency (imported/exported in code but not declared in pubspec.yaml)
- MultiStepSpinner
- Multi-step spinner — shows "Step 1/3: Fetching...", "Step 2/3: ..."
- OutputConfig
- CLI output and formatting constants
- PackageCategories
- Package categorization for organization feature
- PackageCategory
- Package category information
- PackageSuggestion
- Package suggestion data structure
- PackageUsage
- Package usage tracking
- PubspecData
- Data structure for pubspec content
- PubspecManager
- Manager for pubspec.yaml file operations
- SectionInfo
- Section information for pubspec parsing
- SmartpubChecksConfig
- Configuration for SmartPub checks selection
- SmartpubConfig
- Main configuration model for smartpub.yaml
- Spinner
- Strings
- Application strings and messages
- SuggestionService
- Service for submitting package categorization suggestions
- TelemetryService
- Service for collecting anonymous usage telemetry
- UpdateChecker
- Service for checking and managing SmartPub updates
- UpdateInfo
- Information about available updates
Enums
- ChangeAction
- Types of changes that can be made to dependencies
- DependencySection
- Dependency section enumeration
- DependencyStatus
- Dependency status enumeration
- RestoreStatus
- Status of a restore operation
- SpinnerStyle
- Spinner frames — matches Flutter's build output style
Extensions
- DependencySectionExtension on DependencySection
- DependencyStatusExtension on DependencyStatus
- Extension to get display names for enums
Functions
-
loadGroupOverrides(
) → Future< Map< String, String> ?> - Load group overrides from file
-
saveGroupOverrides(
Map< String, String> overrides) → Future<void> - Save group overrides to file
-
withSpinner<
T> ({required String label, required Future< T> task(), String? successLabel, String? failLabel, SpinnerStyle style = SpinnerStyle.braille}) → Future<T> - Convenience: wrap an async task in a spinner automatically.