- Implemented RawFrameDebugScreen for displaying ECU frame data and diagnostics. - Created DtcScreen to show active Diagnostic Trouble Codes (DTCs) with detailed descriptions. - Added DtcRow widget for individual DTC representation. - Introduced GraphScreen for visualizing sensor data over time with customizable time windows. - Developed SensorListScreen to display available sensors and their current values. - Enhanced SettingsScreen with options for Bluetooth connection, ECU protocol selection, polling interval, and theme settings. - Added AppColors and AppTheme for consistent theming across the application. - Implemented BtStatusChip to show Bluetooth connection status in the app bar. - Created RecordFab for starting and stopping data recording sessions.
45 lines
1.3 KiB
Dart
45 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class DtcRow extends StatelessWidget {
|
|
final String code;
|
|
final String description;
|
|
|
|
const DtcRow({super.key, required this.code, required this.description});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3),
|
|
decoration: BoxDecoration(
|
|
color: Colors.red.withAlpha(30),
|
|
borderRadius: BorderRadius.circular(6),
|
|
border: Border.all(color: Colors.red.withAlpha(100)),
|
|
),
|
|
child: Text(
|
|
code,
|
|
style: const TextStyle(
|
|
color: Colors.redAccent,
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.bold,
|
|
fontFamily: 'monospace',
|
|
),
|
|
),
|
|
),
|
|
const SizedBox(width: 12),
|
|
Expanded(
|
|
child: Text(
|
|
description,
|
|
style: const TextStyle(color: Colors.white70, fontSize: 13),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|