mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 23:32:27 +00:00

- Updated color references in various widgets to use the new `opaquePrimary` color for better visual consistency. - Refactored `ColorsManager` to improve color definitions and removed redundant color declarations. - Enhanced UI elements across multiple dialogs and widgets to ensure a cohesive design language. This change promotes maintainability and aligns with the updated color scheme.
34 lines
874 B
Dart
34 lines
874 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
|
|
|
class ValueDisplay extends StatelessWidget {
|
|
final dynamic value;
|
|
final String label;
|
|
final String unit;
|
|
|
|
const ValueDisplay({
|
|
required this.value,
|
|
required this.label,
|
|
super.key,
|
|
required this.unit,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
|
decoration: BoxDecoration(
|
|
color: ColorsManager.opaquePrimary.withOpacity(0.1),
|
|
borderRadius: BorderRadius.circular(10),
|
|
),
|
|
child: Text(
|
|
'$label $unit ',
|
|
style: context.textTheme.headlineMedium!.copyWith(
|
|
color: ColorsManager.opaquePrimary,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|