mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-24 23:42:28 +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.
55 lines
1.5 KiB
Dart
55 lines
1.5 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:intl/intl.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
|
|
|
class HeatMapTooltip extends StatelessWidget {
|
|
const HeatMapTooltip({
|
|
required this.date,
|
|
required this.value,
|
|
super.key,
|
|
});
|
|
|
|
final DateTime date;
|
|
final int value;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return FittedBox(
|
|
fit: BoxFit.scaleDown,
|
|
alignment: AlignmentDirectional.topStart,
|
|
child: Container(
|
|
padding: const EdgeInsets.all(8),
|
|
decoration: BoxDecoration(
|
|
color: ColorsManager.grey700,
|
|
borderRadius: BorderRadius.circular(3),
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
DateFormat('MMM d, yyyy').format(date),
|
|
style: context.textTheme.bodySmall?.copyWith(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w700,
|
|
color: ColorsManager.white,
|
|
),
|
|
),
|
|
const Divider(height: 2, thickness: 1),
|
|
Text(
|
|
'Occupancy detected: $value',
|
|
style: context.textTheme.bodySmall?.copyWith(
|
|
fontSize: 10,
|
|
fontWeight: FontWeight.w500,
|
|
color: ColorsManager.white,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|