Flutter GetX doesn't refresh data

47 Views Asked by At

I'm using GetX in Flutter, but despite fetching data and populating the variable, no changes are reflected. How can I resolve this? Here is my code:

var  custSHTextList = <ValueItem>[].obs;    
return Container(
    height: double.infinity,
    width: MediaQuery.of(context).size.width / 5,
    child: Center(
      child: Obx(
            () => MultiSelectDropDown(
          // controller: _controller,
          onOptionSelected: (options) {
            options.forEach((element) {
              print(element);
            });
            //_dbsController.selectedCusts = x.obs;
          },
          options: _dbsController.custSHTextList.value,
          hint: 'Select',
          searchEnabled: true,
          selectionType: SelectionType.multi,
          chipConfig: const ChipConfig(
            wrapType: WrapType.scroll,
            autoScroll: true,
            labelStyle: TextStyle(fontSize: 8, color: Colors.white),
          ),
          showChipInSingleSelectMode: true,
          // dropdownHeight: 300,
          optionTextStyle: const TextStyle(fontSize: 12),
          selectedOptionIcon: const Icon(Icons.check_circle),
        ),
      ),
    ),
  );
0

There are 0 best solutions below