plinth_hooks
Reusable stateful controllers for Plinth UI
— the equivalent of Mantine's @mantine/hooks.
Usage
final _modal = PlinthDisclosureController();
// Later, in a widget:
PlinthButton(onPressed: _modal.open, child: const Text('Open'));
// Always dispose it, same as any ChangeNotifier:
@override
void dispose() {
_modal.dispose();
super.dispose();
}
What's in this package
PlinthDisclosureController— aChangeNotifier-based open/closed state controller (open(),close(),toggle(),isOpen). Drives every controller-based overlay inplinth_components—PlinthModal,PlinthDrawer,PlinthPopover, andPlinthMenuall take one of these to manage their visibility, so a single controller can coordinate a trigger button and the overlay it opens.
See the full documentation for the complete component reference and a live example app.
Libraries
- plinth_hooks
- Reusable stateful controllers for Plinth UI.