mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
40 lines
1.0 KiB
Dart
40 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.whiteColors,
|
|
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),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|