From 090f56b9f565121d27ac45c2e5801a49669e248a Mon Sep 17 00:00:00 2001 From: open-trade Date: Fri, 20 Nov 2020 00:36:23 +0800 Subject: [PATCH] refactor --- flutter_hbb/lib/common.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/flutter_hbb/lib/common.dart b/flutter_hbb/lib/common.dart index 2fe64bad8..dc4deac90 100644 --- a/flutter_hbb/lib/common.dart +++ b/flutter_hbb/lib/common.dart @@ -39,13 +39,11 @@ void showSuccess(String text) { } bool _hasDialog = false; +typedef BuildAlertDailog = Tuple3> Function( + void Function(void Function())); // https://material.io/develop/flutter/components/dialogs -Future showAlertDialog( - BuildContext context, - Tuple3> Function( - void Function(void Function())) - build, +Future showAlertDialog(BuildContext context, BuildAlertDailog build, {WillPopCallback onWillPop}) async { dismissLoading(); if (_hasDialog) {