Compare commits
1 Commits
491513fc5e
...
3f166c2efa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f166c2efa |
@@ -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<double> 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 {
|
class _FooterToggle extends StatelessWidget {
|
||||||
const _FooterToggle({
|
const _FooterToggle({
|
||||||
required this.label,
|
required this.label,
|
||||||
|
|||||||
Reference in New Issue
Block a user