refactored HTTP error handling and streamlined UI components by centralizing shared logic and removing redundant parameters
This commit is contained in:
@@ -5,14 +5,12 @@ class AsyncDialogAction extends StatefulWidget {
|
||||
final AsyncActionCallback onConfirm;
|
||||
final String? cancelLabel;
|
||||
final AsyncErrorBuilder? errorBuilder;
|
||||
final ButtonStyle? confirmStyle;
|
||||
|
||||
const AsyncDialogAction({
|
||||
required this.confirmLabel,
|
||||
required this.onConfirm,
|
||||
this.cancelLabel = 'Abbrechen',
|
||||
this.errorBuilder,
|
||||
this.confirmStyle,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@@ -58,7 +56,6 @@ class _AsyncDialogActionState extends State<AsyncDialogAction> {
|
||||
child: Text(widget.cancelLabel!),
|
||||
),
|
||||
TextButton(
|
||||
style: widget.confirmStyle,
|
||||
onPressed: _controller.busy
|
||||
? null
|
||||
: () async {
|
||||
|
||||
Reference in New Issue
Block a user