Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
1.2 kB
9
Indexable
Never
Card(
                      color: contact.selected == index
                          ? Colors.orange
                          : Colors.red,
                      child: Theme(
                        data: ThemeData(unselectedWidgetColor: Colors.orange),
                        child: RadioListTile<int>(
                          value: index,
                          groupValue: controller.selectedValue,
                          activeColor: Colors.white,
                          title: Text(contact.cardNumber!
                              .replaceAll(RegExp(r'[^\s](?=.{4})'), '*')),
                          onChanged: (value) {
                            snapshot.data!
                                .forEach((element) => element.selected = 0);
                            snapshot.data![index].selected = 1;
                            controller.update();
                            // controller.selectTR(value);
                            // controller.isSelected.value = true;
                            // print(value);
                            // print(
                            //   controller.isSelected.value,
                            // );
                          },