Skip to content

Commit

Permalink
fix #71 (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
leftcoding committed Jan 13, 2022
1 parent 00c53b3 commit 2c991c4
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit 2c991c4

Please sign in to comment.