Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
3.1 kB
2
Indexable
Never
 Obx(
              () => Padding(
                padding: const EdgeInsets.symmetric(horizontal: 16),
                child: SizedBox(
                  width: Get.width,
                  child: SingleChildScrollView(
                    scrollDirection: Axis.horizontal,
                    child: Row(
                        //mainAxisAlignment: MainAxisAlignment.start,
                        children: changeRequestC.imagefiles
                            .map(
                              (element) => Container(
                                child: Positioned(
                                  top: 0,
                                  right: 0,
                                  left: 0,
                                  bottom: 0,
                                  child: InkWell(
                                    onTap: () {
                                      changeRequestC.imagefiles.remove(element);
                                    },
                                    child: Container(
                                      margin: EdgeInsets.all(60),
                                      decoration: BoxDecoration(
                                        borderRadius: BorderRadius.circular(50),
                                        color: Colors.white.withOpacity(0.5),
                                      ),
                                      child: InkWell(
                                        onTap: () {
                                          Global.confirmDialog(
                                            onConfirmed: () {
                                              changeRequestC.imagefiles
                                                  .remove(element);
                                              Get.back();
                                            },
                                          );
                                        },
                                        child: Icon(
                                          Icons.delete,
                                          color: Colors.redAccent,
                                          size: 30,
                                        ),
                                      ),
                                    ),
                                  ),
                                ),
                                margin: EdgeInsets.only(right: 15),
                                height: 156.2,
                                width: 156.2,
                                decoration: BoxDecoration(
                                    image: DecorationImage(
                                        fit: BoxFit.cover,
                                        image: FileImage(element)),

                                    //border: Border.all(color: hexToColor('#80939D')),
                                    borderRadius: BorderRadius.circular(5.6)),
                              ),
                            )
                            .toList()),
                  ),
                ),
              ),
            ),