fixed overwrite on internal copy, DST drift in widget anchors, inline errors without controller and removed dead room lookup
This commit is contained in:
@@ -31,6 +31,7 @@ class AsyncActionButton extends StatelessWidget {
|
||||
errorBuilder: errorBuilder,
|
||||
onError: onError,
|
||||
onSuccess: onSuccess,
|
||||
showInlineError: showInlineError,
|
||||
builder: (context, busy, handler) {
|
||||
final lead = busy
|
||||
? AppProgressIndicator.small(
|
||||
@@ -38,13 +39,11 @@ class AsyncActionButton extends StatelessWidget {
|
||||
)
|
||||
: (icon == null ? null : Icon(icon));
|
||||
final content = lead == null ? child : _leadingLabel(lead, child);
|
||||
final button = ElevatedButton(
|
||||
return ElevatedButton(
|
||||
onPressed: handler,
|
||||
style: style,
|
||||
child: content,
|
||||
);
|
||||
if (!showInlineError) return button;
|
||||
return _InlineErrorWrapper(controller: controller, child: button);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user