Initial commit: monorepo Match Live TV.
Rails API, app Flutter, infrastruttura Docker/MediaMTX, sito marketing e documentazione di deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
42
mobile/lib/shared/widgets/connected_badge.dart
Normal file
42
mobile/lib/shared/widgets/connected_badge.dart
Normal file
@@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../app/theme.dart';
|
||||
|
||||
/// Dot verde + etichetta COLLEGATO.
|
||||
class ConnectedBadge extends StatelessWidget {
|
||||
const ConnectedBadge({
|
||||
super.key,
|
||||
this.connected = true,
|
||||
this.label,
|
||||
});
|
||||
|
||||
final bool connected;
|
||||
final String? label;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
final color = connected ? AppTheme.successGreen : AppTheme.textSecondary;
|
||||
return Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Container(
|
||||
width: 8,
|
||||
height: 8,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
label ?? (connected ? 'COLLEGATO' : 'DISCONNESSO'),
|
||||
style: theme.textTheme.labelLarge?.copyWith(
|
||||
color: color,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user