flutter_setup_cli library

Functions

addDependencies() → void
Adds this scaffold's required packages (dio, fpdart, get_it, flutter_secure_storage, go_router) via flutter pub add.
askBaseUrl() String
Prompts the user in the terminal for their API base URL and returns it.
createApiServiceFile() → void
Writes lib/core/network/api_service.dart, the abstract API contract (get/post/put/patch/delete).
createAppColorsFile() → void
Writes lib/config/app_colors.dart with a starter set of color tokens.
createAppConstantsFile(String baseUrl) → void
Writes lib/config/app_constants.dart containing the given base URL.
createAppRouterFile() → void
Writes lib/config/routes/app_router.dart, a go_router setup with an auth redirect and one placeholder route.
createAppSecureStorageFile() → void
Writes lib/core/storage/app_secure_storage.dart for storing the access token securely.
createAuthInterceptorFile() → void
Writes a generic auth interceptor that attaches a bearer token supplied via a callback function.
createCoreFolders() → void
Creates the core clean-architecture folder structure inside lib/.
createDependencyInjectionFile() → void
Writes lib/core/di/dependency_injection.dart, wiring up storage, Dio, and ApiService via get_it.
createDioClientFile() → void
Writes lib/core/network/dio_client.dart, the Dio-backed implementation of ApiService.
createExceptionsFile() → void
Writes lib/core/error/exceptions.dart defining low-level exception types.
createFailuresFile() → void
Writes lib/core/error/failures.dart defining the app's Failure hierarchy.
createMainDartFile() → void
Writes lib/main.dart, wiring up dependency injection and go_router so the generated app runs immediately.
createRetryInterceptorFile() → void
Writes the retry interceptor, which retries failed requests with exponential backoff.
createSafeApiCallFile() → void
Writes lib/core/network/safe_api_call.dart, a wrapper that converts Dio errors into typed Failures.