title: How to add image carousel in flutter
body: <p>I am getting images from the firebase realtime database to the application with tag-imgPath. How can I give the images a carousel at the left and right ends of the fullscreen page so the user can go to next image without going back to the list of images and open another image on fullscreen.</p>
  <pre><code>class FullScreenImagePage extends StatelessWidget {
    String imgPath;
    FullScreenImagePage(this.imgPath);
  
    final LinearGradient backgroundGradient = new LinearGradient(
        colors: [new Color(0x10000000), new Color(0x30000000)],
        begin: Alignment.topLeft,
        end: Alignment.bottomRight);
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        body: new SizedBox.expand(
          child: new Container(
            decoration: new BoxDecoration(gradient: backgroundGradient),
            child: new Stack(
              children: &lt;Widget&gt;[
                new Align(
                  alignment: Alignment.center,
                  child: new Hero(
                    tag: imgPath,
                    child: new Image.network(imgPath),
                  ),
                ),
               ],
  
            ),
          ),
  
  
        ),
  
      );
    }
  
            
  </code></pre>