Search code examples
flutterdartflutter-getx

Flutter GetX State Management on button click


Am fairly new to flutter using GetX. I have MainDrawer stateful widget which has two widgets for two accounts personal and business, in my HomePage() i have TextWidget displaying the name of the account selected.. i want to use controller or any feature of GetX to update the displayed name.. NoTE: i have a MainPage() that hold the drawer and bottom Navigation in which HomePage() is one of the pages


Solution

  • Have a look at the State Management section of the official GetX documentation. With a simple obs and obx you should be able to achieve what you describe.