From 40c666e3d1112269f01a9b877bdabfe7d69883ab Mon Sep 17 00:00:00 2001 From: guozhigq Date: Wed, 7 Feb 2024 00:52:25 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E7=BD=91=E7=BB=9C=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/widgets/http_error.dart | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/common/widgets/http_error.dart b/lib/common/widgets/http_error.dart index b02182c6..cbc6659b 100644 --- a/lib/common/widgets/http_error.dart +++ b/lib/common/widgets/http_error.dart @@ -22,20 +22,27 @@ class HttpError extends StatelessWidget { "assets/images/error.svg", height: 200, ), - const SizedBox(height: 20), + const SizedBox(height: 30), Text( errMsg ?? '请求异常', textAlign: TextAlign.center, style: Theme.of(context).textTheme.titleSmall, ), - const SizedBox(height: 30), - OutlinedButton.icon( + const SizedBox(height: 20), + FilledButton.tonal( onPressed: () { fn!(); }, - icon: const Icon(Icons.arrow_forward_outlined, size: 20), - label: Text(btnText ?? '点击重试'), - ) + style: ButtonStyle( + backgroundColor: MaterialStateProperty.resolveWith((states) { + return Theme.of(context).colorScheme.primary.withAlpha(20); + }), + ), + child: Text( + btnText ?? '点击重试', + style: TextStyle(color: Theme.of(context).colorScheme.primary), + ), + ), ], ), ),