replace offstage with if-else for LinearProgressIndicator in dialog

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-18 16:13:24 +08:00
parent a7163c6a04
commit 979203cbdb
7 changed files with 59 additions and 55 deletions

View File

@@ -156,8 +156,8 @@ void changeIdDialog() {
}).toList(),
)).marginOnly(bottom: 8)
: SizedBox.shrink(),
Offstage(
offstage: !isInProgress, child: const LinearProgressIndicator())
// NOT use Offstage to wrap LinearProgressIndicator
if (isInProgress) const LinearProgressIndicator(),
],
),
actions: [
@@ -202,8 +202,8 @@ void changeWhiteList({Function()? callback}) async {
const SizedBox(
height: 4.0,
),
Offstage(
offstage: !isInProgress, child: const LinearProgressIndicator())
// NOT use Offstage to wrap LinearProgressIndicator
if (isInProgress) const LinearProgressIndicator(),
],
),
actions: [
@@ -1435,8 +1435,8 @@ void editAbTagDialog(
.toList(growable: false),
),
),
Offstage(
offstage: !isInProgress, child: const LinearProgressIndicator())
// NOT use Offstage to wrap LinearProgressIndicator
if (isInProgress) const LinearProgressIndicator(),
],
),
actions: [
@@ -1496,9 +1496,9 @@ void renameDialog(
),
),
),
Obx(() => Offstage(
offstage: isInProgress.isFalse,
child: const LinearProgressIndicator())),
// NOT use Offstage to wrap LinearProgressIndicator
Obx(() =>
isInProgress.value ? const LinearProgressIndicator() : Offstage())
],
),
actions: [