simplified code across the app and consolidated duplicated helpers
This commit is contained in:
@@ -29,15 +29,11 @@ class AsyncTextButton extends StatelessWidget {
|
||||
onSuccess: onSuccess,
|
||||
builder: (context, busy, handler) {
|
||||
final content = busy
|
||||
? Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
AppProgressIndicator.small(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
child,
|
||||
],
|
||||
? _leadingLabel(
|
||||
AppProgressIndicator.small(
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
child,
|
||||
)
|
||||
: child;
|
||||
final button = TextButton(onPressed: handler, child: content);
|
||||
|
||||
Reference in New Issue
Block a user