Light box

 

Light box

 

It is useful for displaying images as a slideshow overlay with control of many types of images prepared by the flutter code in the admin panel:

Gallery light box showing image
single light box showing image


Gallery light box showing image:

It is a gallery light box showing image located in:
es_flutter_component/lib/components/es_image/es_light_box/src/lightbox_group.dart
and is used as:
ListView.separated(
                separatorBuilder: (context, index) => SizedBox(width: 10.0),
                scrollDirection: Axis.horizontal,
                itemCount: images.length,
                itemBuilder: (context, position) {
                  return GestureDetector(
                    child: Container(
                        height: 200,
                        width: 200,
                        child: Image.asset(
                          images[position],
                          fit: BoxFit.cover,
                        )),
                    onTap: () {
                      Navigator.push(
                          context,
                          LightBoxRoute(

                              color: Colors.black54,
                              builder: (BuildContext context) {
                                return LightBoxGroup(

                                  initialIndex: position,
                                  imageType: ImageType.ASSET,
                                  images: images,
                                );
                              },
                              dismissible: false));
                    },
                  );
                }),
  // where 
            final List<String> images = [
    "assets/images/img1.jpg",
    "assets/images/img2.jpg",
    "assets/images/img3.jpg",
  ];
      
   



single light box showing image:


It is a unique light box showing image located in:
es_flutter_component/lib/components/es_image/es_light_box/src/lightbox_group.dart
and is used as:

GestureDetector(
child: Container(
height: 200,
width: 200,
child: Image.asset(
"assets/images/img1.jpg",
fit: BoxFit.cover,
)),
onTap: () {
Navigator.push(
context,
LightBoxRoute(
color: Colors.black54,
builder: (BuildContext context) {
return LightBoxUnique(
image: "assets/images/img1.jpg",
imageType: ImageType.ASSET,
);
},
dismissible: true));
},
),