A flutter BannerView package project.
add in pubspec.yaml
banner_view: "^1.2.0"
or
banner_view:
git: https://github.com/yangxiaoweihn/BannerView.git
import 'package:banner_view/banner_view.dart';
new Container(
alignment: Alignment.center,
height: 200.0,
child: new BannerView(
[...]
),
);
support properties:
final List<Widget> banners;
//init index
final int initIndex;
//switch interval
final Duration intervalDuration;
//animation duration
final Duration animationDuration;
final IndicatorContainerBuilder indicatorBuilder;
final Widget indicatorNormal;
final Widget indicatorSelected;
//the margin of between indicator items
final double indicatorMargin;
final PageController controller;
//whether cycle rolling
final bool cycleRolling;
//whether auto rolling
final bool autoRolling;
final Curve curve;
final ValueChanged onPageChanged;
final bool log;