Migration
Migration to v0.1.11
Upgrade guide for Fluxy v0.1.10 and v0.1.11, covering Route DI and Font DSL updates.
Migration to v0.1.11
Fluxy v0.1.11 focuses on Routing & DI Stabilization, automating the registration of controllers defined within your route tree.
New Features
Automatic Route DI
The biggest improvement in v0.1.11 is the automatic registration and disposal of controllers defined within FxRoute. You no longer need to manually call FluxyDI.put() or FluxyDI.delete() for these controllers.
Before:
FxRoute(
path: '/profile',
builder: (context) => ProfilePage(),
controller: (context) {
final c = ProfileController();
FluxyDI.put(c); // Manual registration
return c;
},
)After:
FxRoute(
path: '/profile',
builder: (context) => ProfilePage(),
controller: (context) => ProfileController(), // Auto-registered by framework
)Stability Fixes
- DI Engine: Improved internal framework orchestration with
putByRuntimeTypeanddeleteByRuntimeType. - Exception Handling: Fixed
FluxyDIExceptionwhere controllers inFxRouteweren't being correctly initialized during deep-linking.
Recommended Upgrade Path
- Update your
pubspec.yamltofluxy: ^0.1.11. - Run
flutter pub get. - Simplify your
FxRoutedefinitions by removing manualFluxyDI.putcalls from thecontrollerfactory.