diff options
author | Orangerot <purple@orangerot.dev> | 2025-01-14 16:26:57 +0100 |
---|---|---|
committer | Orangerot <purple@orangerot.dev> | 2025-01-14 16:26:57 +0100 |
commit | 28d0fe7d8c3a38d7c2ded86c30b549ed6be48f3c (patch) | |
tree | 1eef2ccbf39dda7f5981b8a763c8de5b4461d4ec /lib/widgets/level_info_chip.dart | |
parent | 94463a490c039d79a7a5fcd642c0ed2411a509cd (diff) |
feat: show duration in level selection + more robust simfile loader
Diffstat (limited to 'lib/widgets/level_info_chip.dart')
-rw-r--r-- | lib/widgets/level_info_chip.dart | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/widgets/level_info_chip.dart b/lib/widgets/level_info_chip.dart new file mode 100644 index 0000000..8e4146c --- /dev/null +++ b/lib/widgets/level_info_chip.dart @@ -0,0 +1,37 @@ +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 + ), + ]), + ); + } +} |