expandableList method

Widget expandableList(
  1. SettingModelList settingList
)

Implementation

Widget expandableList(SettingModelList settingList) {
  return  ExpansionTile(
    initiallyExpanded: true,
    title: Text(
      settingList.name,
      style: const TextStyle(fontSize: 17,fontWeight: FontWeight.w500),
    ),
    children: settingList.settingList.map((e) => SwitchListTile( //switch at left side of label
        value: e.isStatus,
        controlAffinity: ListTileControlAffinity.trailing,
        onChanged: (bool value){
          e.isStatus=!e.isStatus;

          enxController.settingList.refresh();
          String jsonString = jsonEncode(enxController.settingList);
          GetStorage().write("setting", jsonString);
          //obj.isAudioOnly.value=!obj.isAudioOnly.value;
          //obj.isAudioOnly.refresh();
        },
        title:  Text("${e.name}",style: const TextStyle(fontSize: 15,color: Colors.black,fontWeight: FontWeight.w400),)
    )).toList()

  );

}