probity_dio_get 0.1.0
probity_dio_get: ^0.1.0 copied to clipboard
A Flutter CLI for generating GetX, Dio, ScreenUtil, routing, services, and feature architecture.
probity_dio_get #
probity_dio_get is a Dart CLI dev dependency for Flutter projects. It creates a ready GetX + Dio architecture and can generate new feature modules with predefined code.
What It Creates #
The init command creates:
lib/
main.dart
core/
bindings/
initial_bindings.dart
consts/
assets.dart
colours.dart
fonts.dart
lists.dart
services.dart
strings.dart
theme.dart
network/
api_client.dart
api_exception.dart
auth_intercepter.dart
error_intercepter.dart
logger_intercepter.dart
router/
app_pages.dart
app_routes.dart
services/
current_user.dart
local_db.dart
tokens.dart
features/
authentication/
bindings/
controllers/
repositories/
views/
splash/
views/
It also adds these dependencies to the target app:
dependencies:
dio: ^5.9.2
get: ^4.7.3
logger: ^2.7.0
flutter_secure_storage: ^10.3.1
hive: ^2.2.3
hive_flutter: ^1.1.0
path_provider: ^2.1.6
flutter_screenutil: ^5.9.3
Use As A Local Dev Dependency #
Add the package to a Flutter app:
dev_dependencies:
probity_dio_get:
path: ../path/to/probity_dio_get
From this repository, the path is:
dev_dependencies:
probity_dio_get:
path: packages/probity_dio_get
Then run:
flutter pub get
Commands #
Initialize Project #
Run this inside the Flutter project root:
dart run probity_dio_get init
This creates the full starter architecture and updates pubspec.yaml.
Existing files are skipped by default. To overwrite generated files:
dart run probity_dio_get init --force
To preview changes without writing files:
dart run probity_dio_get init --dry-run
Create Feature #
Run:
dart run probity_dio_get feature profile
This creates:
lib/features/profile/
bindings/
profile_bindings.dart
controllers/
profile_controller.dart
repositories/
profile_repository.dart
views/
profile_screen.dart
It also registers the route in:
lib/core/router/app_routes.dart
lib/core/router/app_pages.dart
Generated route example:
Routes.profileScreen
Generated page example:
GetPage(
name: Routes.profileScreen,
page: () => const ProfileScreen(),
binding: ProfileBindings(),
)
Recommended New Project Flow #
flutter create my_app
cd my_app
Add probity_dio_get under dev_dependencies, then run:
flutter pub get
dart run probity_dio_get init --force
flutter pub get
dart run probity_dio_get feature home
Notes #
- The CLI reads the app name from the target project's
pubspec.yaml. - Generated imports use the target app package name automatically.
- Existing generated files are skipped unless
--forceis passed. - Route registration is skipped if
lib/core/router/app_routes.dartorlib/core/router/app_pages.dartdoes not exist.