getxify 2.0.2
getxify: ^2.0.2 copied to clipboard
An improved and enhanced version of GetX - Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetXify.
GetXify #

GetXify is an improved and enhanced version of GetX - an extra-light and powerful solution for Flutter. It combines high-performance state management, intelligent dependency injection, and route management quickly and practically.
What is GetXify? #
GetXify is a modernized fork of GetX that:
- Supports latest Dart & Flutter - Compatible with Dart SDK ^3.12.2 and Flutter >=3.44.2
- Removes deprecated code - Cleaned up all deprecated APIs and unused modules
- Enhanced code quality - Improved documentation, removed dead code, added safety checks
- Updated APIs - Aligned with latest Flutter APIs for BottomSheet, Snackbar, and Dialog
- Better testing - Expanded test coverage with 222+ passing tests
Breaking Changes from GetX #
- Removed GetConnect module - HTTP/WebSocket communication module has been removed
- Removed mini stream - Stream-related utilities have been removed
- Removed all deprecated methods - Cleaned up all deprecated APIs from the original GetX
Installation #
Add GetXify to your pubspec.yaml file:
dependencies:
getxify:
Import getxify in files that it will be used:
import 'package:getxify/getxify.dart';
Quick Start #
Replace import 'package:get/get.dart'; with import 'package:getxify/getxify.dart';
The API is fully compatible with GetX. All your existing GetX code will work with GetXify.
Basic Example #
void main() => runApp(GetMaterialApp(home: Home()));
class Controller extends GetxController {
var count = 0.obs;
increment() => count++;
}
class Home extends StatelessWidget {
final Controller c = Get.put(Controller());
@override
Widget build(context) {
return Scaffold(
appBar: AppBar(title: Obx(() => Text("Clicks: ${c.count}"))),
body: Center(child: ElevatedButton(
child: Text("Go to Other"),
onPressed: () => Get.to(Other())
)),
floatingActionButton: FloatingActionButton(
child: Icon(Icons.add),
onPressed: c.increment
),
);
}
}
class Other extends StatelessWidget {
final Controller c = Get.find();
@override
Widget build(context) {
return Scaffold(body: Center(child: Text("${c.count}")));
}
}
Example App #
A comprehensive example application demonstrating the key features of GetXify is available in the example/ directory. This example showcases:
Features Demonstrated #
- Nested Routing - Complex route structure with parent-child relationships using
GetRouterOutlet - Route Guards - Authentication middleware (
EnsureAuthMiddleware,EnsureNotAuthedMiddleware) - Named Routes - Type-safe route navigation using the
Routesclass - Route Parameters - Dynamic route parameters (e.g., product details)
- Transitions - Various page transitions (cupertino, size, etc.)
- Reactive State - Using
.obsfor reactive variables in controllers - Services - Global state management with
GetxService - Dependency Injection - Bindings with lazy loading using
Bindingclass - Clean Architecture - Separation of concerns with organized modules
Running the Example #
cd example
flutter pub get
flutter run
Project Structure #
The example follows a clean architecture pattern with:
app/modules/- Feature modules (dashboard, home, login, products, profile, etc.)app/middleware/- Route guards and middlewareapp/routes/- Route configurationservices/- Global services (authentication)models/- Data models
Each module contains its own bindings, controllers, and views following the MVVM pattern.
Documentation #
For detailed documentation on all features, please refer to the official GetX documentation.
GetXify maintains the same API and features as GetX, so all GetX documentation applies directly to GetXify.
Key Features #
- State Management - Reactive and simple state managers
- Route Management - Navigation without context
- Dependency Management - Smart dependency injection
- Internationalization - Easy translations and locales
- Theme Management - Simple theme switching
- Utils & Helpers - Platform detection, responsive design, and more
Migration from GetX #
If you were using GetX and want to migrate to GetXify:
- Replace
import 'package:get/get.dart';withimport 'package:getxify/getxify.dart'; - Replace
getdependency withgetxifyin pubspec.yaml - If you were using GetConnect, you'll need to implement your own HTTP client using dio or http package
- If you were using mini stream utilities, migrate to standard Dart streams or RxDart
- All deprecated methods have been removed, so update your code to use the current APIs
Contributing #
Contributions are welcome! Please feel free to submit a Pull Request.
License #
GetXify is released under the MIT License. See the LICENSE file for details.