Perspective Pageview

Easy to use 3D-Perspective PageView built upon the regular PageView provided by Flutter SDK.

Current Features

  • Supports 2 Aspect Ratios 1:1 & 16:9
  • Enable/Disable Shadow
  • Change Shadow Color

Demo

Usage

To Use, simply add Perspective PageView to your widget tree like this:

Container(
          child: Center(
            // Adding Child Widget of Perspective PageView
            child: PerspectivePageView(
              hasShadow: true, // Enable-Disable Shadow
              shadowColor: Colors.black12, // Change Color
              aspectRatio: PVAspectRatio.ONE_ONE, // Aspect Ratio of 1:1 (Default)
              children: <Widget>[
                GestureDetector(
                  onTap: () {
                    debugPrint("Statement One");
                  },
                  child: Container(
                    color: Colors.red,
                  ),
                ),
                GestureDetector(
                  onTap: () {
                    debugPrint("Statement Two");
                  },
                  child: Container(
                    color: Colors.green,
                  ),
                )
              ],

            ),
          ),
        ),

You can use any of the below mentioned Enums for AspectRatio:

PVAspectRatio.ONE_ONE //for 1:1
PVAspectRatio.SIXTEEN_NINE // for 16:9

Roadmap

Plans to add more variations to PageView transitions.

License

MIT

Libraries

perspective_pageview