skip to Main Content

How to use a method in a Stateful Widget from another Widget – Flutter

So i have this toggle() method in the Stateful SideBar class class SideBar extends StatefulWidget { const SideBar({super.key}); @override State<SideBar> createState() => _SideBarState(); } class _SideBarState extends State<SideBar> with SingleTickerProviderStateMixin{ void toggle() { if (_controller.isCompleted) { _controller.reverse(); } else {_controller.forward();}…

VIEW QUESTION
Back To Top
Search