flutter get when to use GetX<Controller>, GetBuilder<Controller> or Obx()


As the title reads, there are a couple of ways to update state. When should I choose one over another?


There’s no hard rules about this, but here’s how I try to decide:


  • when my controller is already registered elsewhere and I want
  • minimal code/noise
  • a reactive widget


  • when my controller isn’t yet registered or
  • I want to be very explicit/obvious which controller is being used or
  • I need to run some initState calls during creation and I want
  • a reactive widget


  • I want to manually decide when a widget rebuilds
  • I have several state variables that make sense to refresh together as a group


Under the hood, both Obx and GetX use streams, subscribing to controller observable variables change streams to know when to reactively rebuild.

GetBuilder does not.

GetX and GetBuilder both extend StatefulWidget

Answered By – Baker

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *