Flutter中使用进度条seekbar

Yonina ·
更新时间:2024-11-10
· 858 次阅读

效果图

引入依赖 flutter_seekbar: git: https://github.com/LiuC520/flutter_seekbar.git 全量demo代码

https://github.com/LiuC520/flutter_seekbar/blob/master/example/lib/main.dart

简化demo效果

简化demo代码 import 'package:flutter/material.dart'; import 'package:flutter_seekbar/flutter_seekbar.dart'; void main() => runApp(Home()); class Home extends StatefulWidget { @override State createState() { return _HomeState(); } } class _HomeState extends State with SingleTickerProviderStateMixin { @override Widget build(BuildContext context) { return SingleChildScrollView( child: Container( padding: EdgeInsets.fromLTRB(0, 80, 0, 0), child: Column( children: [ Container( width: 200, child: SeekBar( min: 0, max: 100, value: 40, sectionCount: 10, )), ], )), ); } }
作者:程序园中猿



seekbar flutter

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章