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:
39
mobile/lib/shared/widgets/camera_compact_metrics.dart
Normal file
39
mobile/lib/shared/widgets/camera_compact_metrics.dart
Normal file
@@ -0,0 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Riga compatta metriche stream (sostituisce le MetricCard ingombranti in camera).
|
||||
class CameraCompactMetrics extends StatelessWidget {
|
||||
const CameraCompactMetrics({
|
||||
super.key,
|
||||
required this.networkType,
|
||||
required this.bitrateMbps,
|
||||
required this.fps,
|
||||
this.batteryLevel,
|
||||
this.viewerCount,
|
||||
this.light = false,
|
||||
});
|
||||
|
||||
final String networkType;
|
||||
final double bitrateMbps;
|
||||
final int fps;
|
||||
final int? batteryLevel;
|
||||
final int? viewerCount;
|
||||
final bool light;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = light ? Colors.white70 : Theme.of(context).textTheme.bodySmall?.color;
|
||||
final parts = <String>[
|
||||
networkType,
|
||||
'${bitrateMbps.toStringAsFixed(1)} Mbps',
|
||||
'$fps fps',
|
||||
if (batteryLevel != null) '$batteryLevel%',
|
||||
if (viewerCount != null && viewerCount! > 0) '$viewerCount spett.',
|
||||
];
|
||||
return Text(
|
||||
parts.join(' · '),
|
||||
style: TextStyle(fontSize: 11, color: color, fontWeight: FontWeight.w500),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user