public TransformerPageView(
     Key key                                  = null,
     int?index                                = null,
     TimeSpan?duration                        = null,
     Curve curve                              = null,
     float viewportFraction                   = 1.0f,
     bool loop                                = false,
     Axis scrollDirection                     = Axis.horizontal,
     ScrollPhysics physics                    = null,
     bool pageSnapping                        = true,
     ValueChanged <int> onPageChanged         = null,
     IndexController controller               = null,
     PageTransformer transformer              = null,
     IndexedWidgetBuilder itemBuilder         = null,
     TransformerPageController pageController = null,
     int?itemCount                            = null
     ) : base(key: key)
 {
     D.assert(itemCount != null);
     D.assert(itemCount == 0 || itemBuilder != null || transformer != null);
     this.duration =
         duration ?? TimeSpan.FromMilliseconds(TransformerPageViewUtils.kDefaultTransactionDuration);
     this.index            = index;
     this.duration         = duration;
     this.curve            = curve ?? Curves.ease;
     this.viewportFraction = viewportFraction;
     this.loop             = loop;
     this.scrollDirection  = scrollDirection;
     this.physics          = physics;
     this.pageSnapping     = pageSnapping;
     this.onPageChanged    = onPageChanged;
     this.controller       = controller;
     this.transformer      = transformer;
     this.itemBuilder      = itemBuilder;
     this.pageController   = pageController;
     this.itemCount        = itemCount.Value;
 }
 public static TransformerPageView children(
     Key key                                  = null,
     int?index                                = null,
     TimeSpan?duration                        = null,
     Curve curve                              = null,
     float viewportFraction                   = 1.0f,
     bool loop                                = false,
     Axis scrollDirection                     = Axis.horizontal,
     ScrollPhysics physics                    = null,
     bool pageSnapping                        = true,
     ValueChanged <int> onPageChanged         = null,
     IndexController controller               = null,
     PageTransformer transformer              = null,
     List <Widget> children                   = null,
     TransformerPageController pageController = null
     )
 {
     D.assert(children != null);
     return(new TransformerPageView(
                itemCount: children.Count,
                itemBuilder: (context, _index) => children[index: _index],
                pageController: pageController,
                transformer: transformer,
                pageSnapping: pageSnapping,
                key: key,
                index: index,
                duration: duration,
                curve: curve,
                viewportFraction: viewportFraction,
                loop: loop,
                scrollDirection: scrollDirection,
                physics: physics,
                onPageChanged: onPageChanged,
                controller: controller
                ));
 }