Git Product home page Git Product logo

bannergalleryinflutter's Introduction

BannerGalleryInFlutter

用Flutter实现的无限滑动Banner。

Screenshot

可配置的属性

参数名 参数说明
customViewPageItemWidget 自定义内容布局
autoScrollDurationSeconds 自动滑动时间间隔[单位s]
bannerScrollDirection Banner滑动方向[水平/垂直]
bannerMargin Banner之间间距
bannerBorderRadius Banner圆角
bannerDefaultBGColor Banner默认背景颜色
bannerTextAlignment Banner文字位置
bannerTextPadding Banner文字Padding
bannerTextColor Banner文字颜色
bannerTextBGColor Banner文字背景颜色
onPageTap 点击的事件监听
height View高度
indicatorPositioned 指示器位置
indicatorScrollDirection 指示器方向 [水平/垂直]
indicatorNormalColor 指示器默认颜色
indicatorSelectedColor 指示器选中颜色
indicatorNormalSize 指示器点默认大小
indicatorScaleSize 指示器点选中放大倍数,默认1.4倍
indicatorSpacing 指示器点的间距
indicatorStyle 指示器样式[circle: 圆形, square: 方形]
indicatorAnimStyle 指示器动画样式[normal: 选中变色, scaled:选中放大]

使用示例

/// 构建数据
List<BannerGalleryBean> _createTestData() {
    List<BannerGalleryBean> list = new List<BannerGalleryBean>();
    for (int n = 0; n < IMGS.length; n++) {
      list.add(BannerGalleryBean(
          id: n.toString(),
          photoUrl: https://www.baidu.com/img/bd_logo1.png?where=super,
          description: n.toString);
    }
    return list;
  }
  
/// 构建Widget
BannerGalleryWidget(
  data: _createTestData(),
  indicatorSelectedColor: Theme.of(context).primaryColor,
)

bannergalleryinflutter's People

Contributors

h3clikejava avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.