changeif 1.0.0
changeif: ^1.0.0 copied to clipboard
Flutter Hook's useMemoized as dot notation.
changeif #
This package is design for Niku and Flutter Hook.
Flutter Hook's useMemoized as dot notation.
Rebuild widget if the provided value is change (only work with HookWidget and State).
Requirement:
- Niku
- Flutter Hook
Example usage
class WithChangeIf extends HookWidget {
build(context) {
final counter = useState(0);
return NikuColumn([
NikuText("Will not be rebuild ${counter.value}").changeIf(),
NikuButton(Text("Counter: ${counter.value}"))
..onPressed(() {
counter.value++;
}),
]);
}
}