圆角加载按钮
RoundedLoadingButton 是一个 Flutter 包,提供了一个简单的动画加载按钮实现,并带有成功和错误动画。

安装
将此添加到您的pubspec.yaml
dependencies:
rounded_loading_button: ^1.0.0
用法
导入
import 'package:rounded_loading_button/rounded_loading_button.dart';
简单实现
final RoundedLoadingButtonController _btnController = new RoundedLoadingButtonController();
void _doSomething() async {
Timer(Duration(seconds: 3), () {
_btnController.success();
});
}
RoundedLoadingButton(
child: Text('Tap me!', style: TextStyle(color: Colors.white)),
controller: _btnController,
onPressed: _doSomething,
)
GitHub
https://github.com/chrisedg87/flutter_rounded_loading_button