style: doppelte Unterstriche in Closure-Parametern bereinigen

Dart 3 erlaubt mehrere Wildcard-Parameter mit demselben Namen "_" in
einem Scope, daher sind __ / ___ für ungenutzte Callback-Parameter
(pageBuilder, errorBuilder etc.) unnötig. Rein mechanische Änderung,
keine Verhaltensänderung.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Bernd Steckmeister
2026-07-03 06:30:40 +02:00
parent 133a8acbc8
commit 99f10c5210
9 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -689,7 +689,7 @@ class _ParticipantStrip extends StatelessWidget {
return ListView.separated(
scrollDirection: isVertical ? Axis.vertical : Axis.horizontal,
itemCount: participants.length,
separatorBuilder: (_, __) => const SizedBox(width: 12, height: 12),
separatorBuilder: (_, _) => const SizedBox(width: 12, height: 12),
itemBuilder: (context, i) => SizedBox(
width: isVertical ? double.infinity : 101 * participants[i].aspectRatio,
height: 101,
+2 -2
View File
@@ -30,9 +30,9 @@ class AttachmentDialog extends StatefulWidget {
barrierLabel: 'Anhang',
barrierColor: Colors.black54,
transitionDuration: const Duration(milliseconds: 180),
pageBuilder: (_, __, ___) =>
pageBuilder: (_, _, _) =>
AttachmentDialog(files: files, room: room, replyTo: replyTo),
transitionBuilder: (_, anim, __, child) {
transitionBuilder: (_, anim, _, child) {
final curved =
CurvedAnimation(parent: anim, curve: Curves.easeOutBack);
return FadeTransition(
+2 -2
View File
@@ -734,9 +734,9 @@ class _PdfFullscreenViewer extends StatefulWidget {
opaque: true,
barrierColor: Colors.black,
transitionDuration: const Duration(milliseconds: 180),
pageBuilder: (_, __, ___) =>
pageBuilder: (_, _, _) =>
_PdfFullscreenViewer(bytes: bytes, filename: filename, initialPage: initialPage),
transitionsBuilder: (_, anim, __, child) => FadeTransition(opacity: anim, child: child),
transitionsBuilder: (_, anim, _, child) => FadeTransition(opacity: anim, child: child),
));
}
+3 -3
View File
@@ -538,7 +538,7 @@ class _GifStickerPickerState extends State<GifStickerPicker>
child: Image.network(
thumbUrl,
fit: BoxFit.contain,
errorBuilder: (_, __, ___) => Container(color: _pt!.bg2),
errorBuilder: (_, _, _) => Container(color: _pt!.bg2),
),
),
);
@@ -587,7 +587,7 @@ class _StickerCellState extends State<_StickerCell> {
Image.network(
widget.piUrl,
fit: BoxFit.contain,
errorBuilder: (_, __, ___) => Container(color: pt.bg2),
errorBuilder: (_, _, _) => Container(color: pt.bg2),
),
if (showOverlay)
Positioned(
@@ -666,7 +666,7 @@ class _GifCell extends StatelessWidget {
fit: StackFit.expand,
children: [
Image.network(imageUrl, fit: BoxFit.cover,
errorBuilder: (_, __, ___) => Container(color: PyramidTheme.of(context).bg3)),
errorBuilder: (_, _, _) => Container(color: PyramidTheme.of(context).bg3)),
if (isHovered || isFavorite)
Positioned(
top: 4, right: 4,
+2 -2
View File
@@ -90,7 +90,7 @@ class _MxcAvatarState extends State<MxcAvatar> {
width: widget.size,
height: widget.size,
fit: BoxFit.cover,
errorBuilder: (_, __, ___) => widget.placeholder(context),
errorBuilder: (_, _, _) => widget.placeholder(context),
),
);
}
@@ -194,7 +194,7 @@ class _MxcImageState extends State<MxcImage> {
width: widget.width,
height: widget.height,
gaplessPlayback: true,
errorBuilder: (_, __, ___) =>
errorBuilder: (_, _, _) =>
widget.placeholder ?? const SizedBox.shrink(),
);
}
+2 -2
View File
@@ -60,7 +60,7 @@ class _PyramidLoaderState extends State<PyramidLoader>
final painter = AnimatedBuilder(
animation: _ctrl,
builder: (_, __) => CustomPaint(
builder: (_, _) => CustomPaint(
painter: _PyramidPainter(
yaw: _yawAt(_ctrl.value),
accent: accent,
@@ -82,7 +82,7 @@ class _PyramidLoaderState extends State<PyramidLoader>
fit: BoxFit.contain,
repeat: true,
animate: true,
errorBuilder: (_, __, ___) => painter,
errorBuilder: (_, _, _) => painter,
),
),
),
+1 -1
View File
@@ -723,7 +723,7 @@ class _SearchThumbState extends State<_SearchThumb> {
height: size,
child: _bytes != null
? Image.memory(_bytes!, fit: BoxFit.cover,
errorBuilder: (_, __, ___) => _placeholder(pt))
errorBuilder: (_, _, _) => _placeholder(pt))
: _placeholder(pt),
),
);
+1 -1
View File
@@ -1306,7 +1306,7 @@ class _ProfileSectionState extends ConsumerState<_ProfileSection> {
children: [
if (_pendingServerBanner != null)
Image.memory(_pendingServerBanner!, fit: BoxFit.cover,
errorBuilder: (_, __, ___) => const SizedBox.shrink())
errorBuilder: (_, _, _) => const SizedBox.shrink())
else if (existingMxc != null && client != null)
MxcImage(mxcUri: existingMxc, client: client, fit: BoxFit.cover)
else
+2 -2
View File
@@ -27,8 +27,8 @@ class ShareTargetDialog {
barrierLabel: 'Teilen',
barrierColor: Colors.black54,
transitionDuration: const Duration(milliseconds: 180),
pageBuilder: (_, __, ___) => _ShareTargetPicker(client: client, share: share),
transitionBuilder: (_, anim, __, child) {
pageBuilder: (_, _, _) => _ShareTargetPicker(client: client, share: share),
transitionBuilder: (_, anim, _, child) {
final curved = CurvedAnimation(parent: anim, curve: Curves.easeOutBack);
return FadeTransition(
opacity: anim,