GetX<T extends GetLifeCycleMixin> constructor

const GetX<T extends GetLifeCycleMixin>({
  1. required GetXControllerBuilder<T> builder,
  2. Key? key,
  3. String? tag,
  4. bool global = true,
  5. bool autoRemove = true,
  6. bool assignId = false,
  7. void initState(
    1. GetXState<T> state
    )?,
  8. void dispose(
    1. GetXState<T> state
    )?,
  9. void didChangeDependencies(
    1. GetXState<T> state
    )?,
  10. void didUpdateWidget(
    1. GetX<T> oldWidget,
    2. GetXState<T> state
    )?,
  11. T? init,
})

Constructs a GetX widget.

builder is required and must not be null. It is used to build the widget based on the controller's state.

Implementation

const GetX({
  required this.builder,
  super.key,
  this.tag,
  this.global = true,
  this.autoRemove = true,
  this.assignId = false,
  this.initState,
  this.dispose,
  this.didChangeDependencies,
  this.didUpdateWidget,
  this.init,
});