实现方式
import 'package:oktoast/oktoast.dart';
在屏幕中间展示加载标签
_showLoading() {
showToastWidget(
Container(
width: 150,
height: 100,
color: Colors.black54,
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
CircularProgressIndicator(
backgroundColor: Colors.grey[200],
valueColor: AlwaysStoppedAnimation(Colors.blue),
),
Container(
margin: EdgeInsets.only(top: 10),
child: Text('loading...'),
)
],
),
),
),
dismissOtherToast: true,
);
}
}