simplified code across the app and consolidated duplicated helpers

This commit is contained in:
2026-09-27 17:29:54 +02:00
parent 3e856d0b1c
commit ee1240f71a
155 changed files with 1772 additions and 2546 deletions
@@ -32,20 +32,12 @@ class AsyncActionButton extends StatelessWidget {
onError: onError,
onSuccess: onSuccess,
builder: (context, busy, handler) {
final spinner = AppProgressIndicator.small(
color: Theme.of(context).colorScheme.onPrimary,
);
final content = busy
? Row(
mainAxisSize: MainAxisSize.min,
children: [spinner, const SizedBox(width: 8), child],
final lead = busy
? AppProgressIndicator.small(
color: Theme.of(context).colorScheme.onPrimary,
)
: (icon != null
? Row(
mainAxisSize: MainAxisSize.min,
children: [Icon(icon), const SizedBox(width: 8), child],
)
: child);
: (icon == null ? null : Icon(icon));
final content = lead == null ? child : _leadingLabel(lead, child);
final button = ElevatedButton(
onPressed: handler,
style: style,