StateNotifier Hook This package provides a useStateNotifier hook similar to useValueListenable. There is also useCreateStateNotifier hook which creates a StateNotifier and automatically dispose it. Usage // 1. Create your state notifier as usual. class CounterNotifier extends StateNotifier<int> { CounterNotifier() : super(0); void increment() => state++; void decrement() => state–; } // 2. Extend hook widget class ReadMeExample extends HookWidget { const ReadMeExample({Key? ..
Category : Hooks
reactives A new way for Flutter to reuse/group common logic. Think of them like React hooks but for and of flutter. Motive Have you ever written code like this? class AwesomeWidget extends StatefulWidget { const AwesomeWidget({Key? key}) : super(key: key); @override _AwesomeWidgetState createState() => _AwesomeWidgetState(); } class _AwesomeWidgetState extends State<AwesomeWidget> with TickerProviderStateMixin { late final ..