0

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

  • 1
    extend your drawer class with your controller `class AppDrawer extends GetView` after that you can access your accounts name with `controller.accounts.nam` – Z-Soroush May 01 '21 at 22:36

1 Answers1

2

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.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 30 '21 at 00:03
  • I know its late to say this.. but thanks, and yes i had a look and now am just fluttering in happiness. – Jon-ElCapitan Jun 09 '22 at 14:00