mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Refactor SliderValueSelector and ValueDisplay to include unit handling and improve UI consistency across sensor dialogs.
This commit is contained in:
@ -5,11 +5,13 @@ 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
|
||||
@ -21,7 +23,7 @@ class ValueDisplay extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Text(
|
||||
label,
|
||||
'$label$unit',
|
||||
style: context.textTheme.headlineMedium!.copyWith(
|
||||
color: ColorsManager.primaryColorWithOpacity,
|
||||
),
|
||||
|
Reference in New Issue
Block a user