advanced_value_notifier 0.0.1 copy "advanced_value_notifier: ^0.0.1" to clipboard
advanced_value_notifier: ^0.0.1 copied to clipboard

A value notifier which has super powers

This package allows you to notify listener about the previous value and current value.

Features #

  • Get both previous and current value
  • Listen to the value changes
  • Build widget optimally by consider previous and current value

Usage #

HistoryValueListenableListener #

    HistoryValueListenableListener<int>(
      historyValueNotifier: counter,
      historyValueWidgetListener: (int prevValue, int value) {
        print("Prev $prevValue Curr $value");
      },
      child: const Text(
        'Hello',
      ),
    )

HistoryValueListenableListener #

    HistoryValueListenableBuilder<int>(
      historyValueNotifier: counter,
      historyValueBuilder: (BuildContext context, int prevValue,
          int value, Widget? child) {
        return Text(
          "Prev $prevValue Curr $value",
          style: Theme.of(context).textTheme.headlineMedium,
        );
      },
    )

Additional information #

Connect with Author over Linkedin

1
likes
0
points
33
downloads

Publisher

verified publisherabhishak.in

Weekly Downloads

A value notifier which has super powers

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on advanced_value_notifier