改为null的形式
This commit is contained in:
@ -122,13 +122,11 @@ class _BangumiInfoState extends State<BangumiInfo> {
|
||||
late double sheetHeight;
|
||||
int? cid;
|
||||
bool isProcessing = false;
|
||||
VoidCallback handleState(Future Function() action) {
|
||||
return () async {
|
||||
if (!isProcessing) {
|
||||
setState(() => isProcessing = true);
|
||||
await action();
|
||||
setState(() => isProcessing = false);
|
||||
}
|
||||
void Function()? handleState(Future Function() action) {
|
||||
return isProcessing ? null : () async {
|
||||
setState(() => isProcessing = true);
|
||||
await action();
|
||||
setState(() => isProcessing = false);
|
||||
};
|
||||
}
|
||||
@override
|
||||
|
Reference in New Issue
Block a user