Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #71 #77

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class _ActionSheetEntryPageState extends State<ActionSheetEntryPage> {
// 用于控制timer只加载一次
var started = false;
// 计时器
var periodTimer;
Timer periodTimer;
List<BrnCommonActionSheetItem> actions = List();
actions.add(BrnCommonActionSheetItem(
'倒计时:$countdown',
Expand Down Expand Up @@ -369,7 +369,7 @@ class _ActionSheetEntryPageState extends State<ActionSheetEntryPage> {
actions[0].desc = '倒计时:$times';
});
} else if (countdown == 0) {
periodTimer.onCancel();
periodTimer.cancel();
}
});
}
Expand All @@ -380,15 +380,15 @@ class _ActionSheetEntryPageState extends State<ActionSheetEntryPage> {
BrnCommonActionSheetItem actionEle,
) {
// 点击后立即停止计时
periodTimer.onCancel();
periodTimer.cancel();
var title = actionEle.title;
BrnToast.show("title: $title, index: $index", context);
},
);
});
// then用来在pop折后停止timer,如果不需要在pop后进行操作,不需要使用then
}).then((value) {
periodTimer.onCancel();
periodTimer.cancel();
});
}

Expand Down