dart format

This commit is contained in:
2026-05-08 20:12:40 +02:00
parent 9e139b5704
commit 3b8da1d3d6
295 changed files with 6404 additions and 4161 deletions
+15 -4
View File
@@ -6,7 +6,8 @@ class _AsyncMixin extends StatefulWidget {
final AsyncErrorBuilder? errorBuilder;
final void Function(String message)? onError;
final VoidCallback? onSuccess;
final Widget Function(BuildContext context, bool busy, VoidCallback? handler) builder;
final Widget Function(BuildContext context, bool busy, VoidCallback? handler)
builder;
const _AsyncMixin({
required this.onPressed,
@@ -59,7 +60,10 @@ class _AsyncMixinState extends State<_AsyncMixin> {
Future<void> _trigger() async {
final action = widget.onPressed;
if (action == null) return;
final success = await _controller.run(action, errorBuilder: widget.errorBuilder);
final success = await _controller.run(
action,
errorBuilder: widget.errorBuilder,
);
if (!mounted) return;
if (success) {
widget.onSuccess?.call();
@@ -71,7 +75,11 @@ class _AsyncMixinState extends State<_AsyncMixin> {
@override
Widget build(BuildContext context) {
final handler = widget.onPressed == null ? null : _trigger;
return widget.builder(context, _controller.busy, _controller.busy ? null : handler);
return widget.builder(
context,
_controller.busy,
_controller.busy ? null : handler,
);
}
}
@@ -98,7 +106,10 @@ class _InlineErrorWrapper extends StatelessWidget {
Text(
err,
textAlign: TextAlign.center,
style: TextStyle(color: Theme.of(context).colorScheme.error, fontSize: 13),
style: TextStyle(
color: Theme.of(context).colorScheme.error,
fontSize: 13,
),
),
],
],