💄 Scrollable alert

This commit is contained in:
2026-01-12 00:08:51 +08:00
parent 9a41ff26ef
commit ab2fc1013b

View File

@@ -259,24 +259,26 @@ void showErrorAlert(dynamic err, {IconData? icon}) {
title: null, title: null,
titlePadding: EdgeInsets.zero, titlePadding: EdgeInsets.zero,
contentPadding: const EdgeInsets.fromLTRB(24, 24, 24, 0), contentPadding: const EdgeInsets.fromLTRB(24, 24, 24, 0),
content: Column( content: SingleChildScrollView(
mainAxisSize: MainAxisSize.min, child: Column(
crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min,
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Icon( children: [
icon ?? Icons.error_outline_rounded, Icon(
size: 48, icon ?? Icons.error_outline_rounded,
color: Theme.of(context).colorScheme.error, size: 48,
), color: Theme.of(context).colorScheme.error,
const Gap(16), ),
Text( const Gap(16),
'somethingWentWrong'.tr(), Text(
style: Theme.of(context).textTheme.titleLarge, 'somethingWentWrong'.tr(),
), style: Theme.of(context).textTheme.titleLarge,
const Gap(8), ),
Text(text), const Gap(8),
const Gap(8), SelectableText(text),
], const Gap(8),
],
),
), ),
actions: [ actions: [
TextButton( TextButton(