Sense_the_Rhythm/lib/widgets/level_info_chip.dart

38 lines
1 KiB
Dart

import 'package:flutter/material.dart';
class LevelInfoChip extends StatelessWidget {
final String label;
final IconData icon;
const LevelInfoChip({super.key, required this.label, required this.icon});
@override
Widget build(BuildContext context) {
return OutlinedButton(
style: ButtonStyle(
shape: WidgetStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(5)))),
minimumSize: WidgetStateProperty.all(Size(10, 10)),
tapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: WidgetStateProperty.all(
EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0))
),
onPressed: () {},
child: Row(children: [
Icon(
icon,
size: 16,
),
SizedBox(width: 4),
Text(
label,
style: TextStyle(
fontSize: 14,
fontWeight:
FontWeight.w200), // Adjust font size for smaller appearance
),
]),
);
}
}