mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-25 17:19:41 +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.
49 lines
1.3 KiB
Dart
49 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
|
|
class SpaceWidget extends StatelessWidget {
|
|
final String name;
|
|
final Offset position;
|
|
final VoidCallback onTap;
|
|
|
|
const SpaceWidget({
|
|
super.key,
|
|
required this.name,
|
|
required this.position,
|
|
required this.onTap,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Positioned(
|
|
left: position.dx,
|
|
top: position.dy,
|
|
child: GestureDetector(
|
|
onTap: onTap,
|
|
child: Container(
|
|
padding: const EdgeInsets.all(8.0),
|
|
decoration: BoxDecoration(
|
|
color: ColorsManager.white,
|
|
borderRadius: BorderRadius.circular(8),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: ColorsManager.lightGrayColor.withOpacity(0.5),
|
|
spreadRadius: 5,
|
|
blurRadius: 7,
|
|
offset: const Offset(0, 3),
|
|
),
|
|
],
|
|
),
|
|
child: Row(
|
|
children: [
|
|
const Icon(Icons.location_on, color: ColorsManager.spaceColor),
|
|
const SizedBox(width: 8),
|
|
Text(name, style: Theme.of(context).textTheme.bodyMedium),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|