From 3f166c2efae13dc9ea07e503b3c9564b5d16d1b0 Mon Sep 17 00:00:00 2001 From: Misaka Date: Wed, 17 Jun 2026 22:55:42 +0800 Subject: [PATCH] Remove unused _ConnectionIndicator and _StatusDot widgets Delete dead code that triggered an unused_element analyzer warning. _ConnectionIndicator was unreferenced and _StatusDot was only used by it. Co-Authored-By: Claude Opus 4.6 --- lib/main.dart | 60 --------------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 886e12e..b829b28 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1171,66 +1171,6 @@ class _ConnectionSummary extends StatelessWidget { } } -class _ConnectionIndicator extends StatelessWidget { - const _ConnectionIndicator({ - required this.connected, - required this.connecting, - required this.animation, - }); - - final bool connected; - final bool connecting; - final Animation animation; - - @override - Widget build(BuildContext context) { - final color = connected - ? const Color(0xFF16A34A) - : connecting - ? Theme.of(context).colorScheme.primary - : const Color(0xFFDC2626); - - return AnimatedBuilder( - animation: animation, - builder: (context, child) { - return _StatusDot( - color: color, - scale: connected || connecting ? animation.value : 1, - ); - }, - ); - } -} - -class _StatusDot extends StatelessWidget { - const _StatusDot({required this.color, required this.scale}); - - final Color color; - final double scale; - - @override - Widget build(BuildContext context) { - return Transform.scale( - scale: scale, - child: Container( - width: 12, - height: 12, - decoration: BoxDecoration( - color: color, - shape: BoxShape.circle, - boxShadow: [ - BoxShadow( - color: color.withValues(alpha: 0.24), - blurRadius: 8, - spreadRadius: 2, - ), - ], - ), - ), - ); - } -} - class _FooterToggle extends StatelessWidget { const _FooterToggle({ required this.label,