v0.0.2
swipeable_button_view
您可以使用 swipeable_button_view 创建带有涟漪动画的页面。
114喜欢 2650近 30 天下载140Pub 分数
AndroidiOSWebmacOSWindowsLinux
cmrnrbs/swipeable_button_view open-source repository details.
以下为英文项目原文快照,最新内容请访问 GitHub。
You can create ripple animated pages with swipeable_button_view.
Add swipeable_button_view: to your pubspec.yaml dependencies then run flutter pub get
dependencies:
swipeable_button_view:
Then import the package to use
import 'package:swipeable_button_view/swipeable_button_view.dart';
import 'package:swipeable_button_view/swipeable_button_view.dart';
SwipeableButtonView(
buttonText: 'SLIDE TO PAYMENT',
buttonWidget: Container(
child: Icon(Icons.arrow_forward_ios_rounded,
color: Colors.grey,
),),
activeColor: Color(0xFF009C41),
isFinished: isFinished,
onWaitingProcess: () {
Future.delayed(Duration(seconds: 2), () {
setState(() {
isFinished = true;
});
});
},
onFinish: () async {
await Navigator.push(context,
PageTransition(
type: PageTransitionType.fade,
child: DashboardScreen()));
//TODO: For reverse ripple effect animation
setState(() {
isFinished = false;
});
},
)
| props | types | defaultValues | isRequired |
|---|---|---|---|
| onFinish | VoidCallback |
true |
|
| onWaitingProcess | VoidCallback |
true |
|
| activeColor | Color |
true |
|
| buttonWidget | Widget |
true |
|
| buttonText | String |
true |
|
| isFinished | bool |
false |
|
| isActive | bool |
true |
|
| disableColor | Color |
Colors.grey |
|
| buttonColor | Color |
Colors.white |
|
| buttontextstyle | TextStyle |
TextStyle(color: Colors.white, fontWeight: FontWeight.bold) |
|
| indicatorColor | Animation<Color?> |
AlwaysStoppedAnimation<Color>(Colors.white)}) |
依赖清单 3 项
{"sdk":"flutter"}^1.0.0{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗