declare 1.3.2
declare: ^1.3.2 copied to clipboard
A lightweight, SwiftUI-inspired Prop management library for Flutter. Powered by Prop, ViewModel, and Declare.
0.0.1 #
- Initial release of
declare
.
[1.3.1 - Stable] - 2025-06-08 #
Added #
- Added
onInit()
lifecycle method toViewModel
for initialization logic. - Introduced
register()
method inViewModel
to simplifyProp
registration. - Automatically collects
Prop
s without needing to overrideget props
.
Changed #
- Updated
Declare
widget to callonInit()
duringinitState()
.
Improved #
- ViewModel structure is now cleaner and less boilerplate.
- Greatly improved ergonomics for creating and managing reactive ViewModels.
Example Migration #
class CounterViewModel extends ViewModel {
final counter = Prop(0);
CounterViewModel() {
register(counter); // No need to override props manually
}
@override
void onInit() {
print('Initialized');
}
void increment() => counter.value++;
}
[1.3.2 - Stable] - 2025-06-09 #
- Readme Update