Untitled

 avatar
unknown
plain_text
3 years ago
3.1 kB
4
Indexable
 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()),
                  ),
                ),
              ),
            ),
Editor is loading...