改为null的形式
This commit is contained in:
@ -122,13 +122,11 @@ class _BangumiInfoState extends State<BangumiInfo> {
|
|||||||
late double sheetHeight;
|
late double sheetHeight;
|
||||||
int? cid;
|
int? cid;
|
||||||
bool isProcessing = false;
|
bool isProcessing = false;
|
||||||
VoidCallback handleState(Future Function() action) {
|
void Function()? handleState(Future Function() action) {
|
||||||
return () async {
|
return isProcessing ? null : () async {
|
||||||
if (!isProcessing) {
|
setState(() => isProcessing = true);
|
||||||
setState(() => isProcessing = true);
|
await action();
|
||||||
await action();
|
setState(() => isProcessing = false);
|
||||||
setState(() => isProcessing = false);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
|
@ -24,13 +24,11 @@ class _ActionPanelState extends State<ActionPanel> {
|
|||||||
final DynamicsController _dynamicsController = Get.put(DynamicsController());
|
final DynamicsController _dynamicsController = Get.put(DynamicsController());
|
||||||
late ModuleStatModel stat;
|
late ModuleStatModel stat;
|
||||||
bool isProcessing = false;
|
bool isProcessing = false;
|
||||||
VoidCallback handleState(Future Function() action) {
|
void Function()? handleState(Future Function() action) {
|
||||||
return () async {
|
return isProcessing ? null : () async {
|
||||||
if (!isProcessing) {
|
setState(() => isProcessing = true);
|
||||||
setState(() => isProcessing = true);
|
await action();
|
||||||
await action();
|
setState(() => isProcessing = false);
|
||||||
setState(() => isProcessing = false);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
@ -135,13 +137,11 @@ class _VideoInfoState extends State<VideoInfo> with TickerProviderStateMixin {
|
|||||||
late String memberHeroTag;
|
late String memberHeroTag;
|
||||||
late bool enableAi;
|
late bool enableAi;
|
||||||
bool isProcessing = false;
|
bool isProcessing = false;
|
||||||
VoidCallback handleState(Future Function() action) {
|
void Function()? handleState(Future Function() action) {
|
||||||
return () async {
|
return isProcessing ? null : () async {
|
||||||
if (!isProcessing) {
|
setState(() => isProcessing = true);
|
||||||
setState(() => isProcessing = true);
|
await action();
|
||||||
await action();
|
setState(() => isProcessing = false);
|
||||||
setState(() => isProcessing = false);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
|
@ -48,13 +48,11 @@ class _ZanButtonState extends State<ZanButton> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool isProcessing = false;
|
bool isProcessing = false;
|
||||||
VoidCallback handleState(Future Function() action) {
|
void Function()? handleState(Future Function() action) {
|
||||||
return () async {
|
return isProcessing ? null : () async {
|
||||||
if (!isProcessing) {
|
setState(() => isProcessing = true);
|
||||||
setState(() => isProcessing = true);
|
await action();
|
||||||
await action();
|
setState(() => isProcessing = false);
|
||||||
setState(() => isProcessing = false);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user