v2.0.0custom_sliding_segmented_control
允许您灵活配置用于显示控件的 widget。您可以添加颜色、速度、大小、初始值、动画等。
232喜欢 6.3万近 30 天下载150Pub 分数
AndroidiOSWebmacOSWindowsLinux
自定义滑动分段控件
以下为英文项目原文快照,最新内容请访问 GitHub。
Allows you to flexibly configure the widget for displaying controls. You can add color, speed, size, initial value, animation and more.
import 'package:custom_sliding_segmented_control/custom_sliding_segmented_control.dart';
CustomSlidingSegmentedControl<int>(
initialValue: 2,
children: {
1: Text('News daily portal'),
2: Text('Map'),
3: Text('Paper'),
},
decoration: BoxDecoration(
color: CupertinoColors.lightBackgroundGray,
borderRadius: BorderRadius.circular(8),
),
thumbDecoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(.3),
blurRadius: 4.0,
spreadRadius: 1.0,
offset: Offset(
0.0,
2.0,
),
),
],
),
duration: Duration(milliseconds: 300),
curve: Curves.easeInToLinear,
onValueChanged: (v) {
print(v);
},
),
依赖清单 5 项
^1.0.1{"sdk":"flutter"}^1.1.0{"sdk":"flutter"}^2.8.0先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗