mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
41 lines
1.1 KiB
Dart
41 lines
1.1 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({
|
|
super.key,
|
|
this.label = 'Edit',
|
|
required this.onTap,
|
|
this.labelColor = ColorsManager.spaceColor,
|
|
this.backgroundColor = ColorsManager.whiteColors,
|
|
this.borderColor = ColorsManager.spaceColor,
|
|
this.borderRadius = 16.0,
|
|
});
|
|
|
|
@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),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|