kshowSuccess function
显示成功 seconds:显示时长,单位-秒
Implementation
void kshowSuccess(
String? text, {
int? seconds,
}) {
if (text == null || text.kisBlank()) {
return;
}
var config = UiPlatform.get.getEasyLoadingConfig();
EasyLoading.instance
..loadingStyle = EasyLoadingStyle.custom
..backgroundColor = config.successBackgroundColor
..textColor = config.successTextColor
..fontSize = config.fontSize ?? 15.sp
..indicatorColor = Colors.white
..successWidget = config.successWidget;
// ..successWidget = Icon(
// Icons.down,
// color: Colors.white,
// size: EasyLoading.instance.indicatorSize,
if (seconds != null && seconds > 0) {
EasyLoading.showSuccess(text, duration: Duration(seconds: seconds));
} else {
EasyLoading.showSuccess(text);
}
}