refactor(ui): update tags in DeviceLogsScreen
This commit is contained in:
38
lib/feature/device_log/widgets/tag_widget.dart
Normal file
38
lib/feature/device_log/widgets/tag_widget.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TagWidgetShared extends StatelessWidget {
|
||||
const TagWidgetShared({
|
||||
super.key,
|
||||
required this.boxColor,
|
||||
this.boxRadius,
|
||||
this.boxHeight,
|
||||
this.boxWidth,
|
||||
required this.tagContent,
|
||||
});
|
||||
final Color? boxColor;
|
||||
final double? boxRadius;
|
||||
final double? boxHeight;
|
||||
final double? boxWidth;
|
||||
final String? tagContent;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: boxColor,
|
||||
borderRadius: BorderRadius.circular(boxRadius ?? 10),
|
||||
),
|
||||
height: boxHeight ?? 40,
|
||||
width: boxWidth ?? 100,
|
||||
child: Center(
|
||||
child: Text(
|
||||
tagContent ?? "",
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user