greyOverlay method

Widget greyOverlay(
  1. BuildContext context,
  2. AssetEntity asset
)

Overlays imageItemBuilder amd videoItemBuilder to display the slected state

Implementation

Widget greyOverlay(BuildContext context, AssetEntity asset){

  //Width of the screen
  var width = MediaQuery.of(context).size.width;

  return Stack(
    children: [
      Positioned.fill(
        child: Opacity(
          opacity: 0.4,
          child: Container(
            height: width / 3,
            width: width / 3,
            color: Colors.blue,
          ),
        ),
      ),
    ],
  );
}