👽 Support new activity API

This commit is contained in:
2025-06-09 01:06:52 +08:00
parent 7740cf7830
commit 1f46f89056
8 changed files with 50 additions and 125 deletions

View File

@ -9,7 +9,11 @@ class ResponseErrorWidget extends StatelessWidget {
final dynamic error;
final VoidCallback onRetry;
const ResponseErrorWidget({super.key, required this.error, required this.onRetry});
const ResponseErrorWidget({
super.key,
required this.error,
required this.onRetry,
});
@override
Widget build(BuildContext context) {
@ -36,6 +40,15 @@ class ResponseErrorWidget extends StatelessWidget {
],
),
).center()
else if (error is DioException && error.response != null)
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 320),
child: Text(
error.response.toString(),
textAlign: TextAlign.center,
style: const TextStyle(color: Color(0xFF757575)),
),
).center()
else
ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 320),