declare 1.3.2 copy "declare: ^1.3.2" to clipboard
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 to ViewModel for initialization logic.
  • Introduced register() method in ViewModel to simplify Prop registration.
  • Automatically collects Props without needing to override get props.

Changed #

  • Updated Declare widget to call onInit() during initState().

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
3
likes
160
points
343
downloads

Publisher

unverified uploader

Weekly Downloads

A lightweight, SwiftUI-inspired Prop management library for Flutter. Powered by Prop, ViewModel, and Declare.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on declare