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.
39 lines
1.0 KiB
Dart
39 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:syncrow_web/utils/color_manager.dart';
|
|
|
|
class EditChip extends StatelessWidget {
|
|
final String label;
|
|
final VoidCallback onTap;
|
|
final Color labelColor;
|
|
final Color backgroundColor;
|
|
final Color borderColor;
|
|
final double borderRadius;
|
|
|
|
const EditChip({
|
|
Key? key,
|
|
this.label = 'Edit',
|
|
required this.onTap,
|
|
this.labelColor = ColorsManager.spaceColor,
|
|
this.backgroundColor = ColorsManager.white,
|
|
this.borderColor = ColorsManager.spaceColor,
|
|
this.borderRadius = 16.0,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onTap,
|
|
child: Chip(
|
|
label: Text(label,
|
|
style:
|
|
Theme.of(context).textTheme.bodySmall!.copyWith(color: labelColor)),
|
|
backgroundColor: backgroundColor,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(borderRadius),
|
|
side: BorderSide(color: borderColor),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|