ff_stars 0.0.2 copy "ff_stars: ^0.0.2" to clipboard
ff_stars: ^0.0.2 copied to clipboard

outdated

星星评价组件--支持整星, 半星 任意星. 支持点击&拖动调整, 可设置最低分. 支持自定义星星图片, 大小, 间距, 数量.

ffstars #

功能简介 #

  1. 支持整星, 半星 任意星.
  2. 支持点击&拖动调整, 可设置最低分.
  3. 支持自定义星星图片, 大小, 间距, 数量.

效果截图 #

pub #

// 集成
dependencies:
  ff_stars: ^0.0.2

// 引入
import 'package:ff_stars/ff_stars.dart';

使用方法 #

FFStars(
  normalStar: Image.asset("assets/你的未选中图.png"),
  selectedStar: Image.asset("assets/你的选中图.png"),
  starsChanged: (realStars, choosedStars) {
    print("实际选择: ${choosedStars}, 最终得分: ${realStars}");
  },
  step: 0.01,/// 用于设置半星(0.5), 整星(1.0), 任意星(0.01), 可在0.01 - 1.0之间自定义, 默认值为0.01
  currenStars: 4.3,/// 默认有几颗星星, 默认值为0
  // starCount: 5,/// 一共有几颗星, 默认值5
  // starHeight: 40,/// 星星的高度, 默认30
  // starWidth: 40,/// 星星的宽度,默认30
  // starMargin: 20,/// 星星间的间距, 默认10
  // justShow: true,/// 是否仅做展示, 默认false
),

主页-GitHub #

https://github.com/flutting/ff_stars
3
likes
0
pub points
85%
popularity

Publisher

unverified uploader

星星评价组件--支持整星, 半星 任意星. 支持点击&拖动调整, 可设置最低分. 支持自定义星星图片, 大小, 间距, 数量.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on ff_stars