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