39 lines
859 B
Dart
39 lines
859 B
Dart
|
|
import 'package:flutter/material.dart';
|
||
|
|
|
||
|
|
class MiniStatusValue extends StatelessWidget {
|
||
|
|
final String label;
|
||
|
|
final String value;
|
||
|
|
final Color color;
|
||
|
|
|
||
|
|
const MiniStatusValue({
|
||
|
|
required this.label,
|
||
|
|
required this.value,
|
||
|
|
required this.color,
|
||
|
|
});
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
return RichText(
|
||
|
|
text: TextSpan(
|
||
|
|
style: Theme.of(context).textTheme.labelMedium,
|
||
|
|
children: [
|
||
|
|
TextSpan(
|
||
|
|
text: '$label ',
|
||
|
|
style: TextStyle(
|
||
|
|
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||
|
|
fontWeight: FontWeight.w600,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
TextSpan(
|
||
|
|
text: value,
|
||
|
|
style: TextStyle(
|
||
|
|
color: color,
|
||
|
|
fontWeight: FontWeight.w800,
|
||
|
|
),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|