As the title reads, there are a couple of ways to update state. When should I choose one over another?
flutter get when to use GetX<Controller>, GetBuilder<Controller> or Obx()
11.5k views Asked by Nero At
1
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:
Obx
GetX
initState
calls during creation and I wantGetBuilder
Notes
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