level_info_chip.dart (1062B)
1 import 'package:flutter/material.dart'; 2 3 class LevelInfoChip extends StatelessWidget { 4 final String label; 5 final IconData icon; 6 7 const LevelInfoChip({super.key, required this.label, required this.icon}); 8 9 @override 10 Widget build(BuildContext context) { 11 return OutlinedButton( 12 style: ButtonStyle( 13 shape: WidgetStateProperty.all(RoundedRectangleBorder( 14 borderRadius: BorderRadius.all(Radius.circular(5)))), 15 minimumSize: WidgetStateProperty.all(Size(10, 10)), 16 tapTargetSize: MaterialTapTargetSize.shrinkWrap, 17 padding: WidgetStateProperty.all( 18 EdgeInsets.symmetric(vertical: 4.0, horizontal: 5.0)) 19 ), 20 onPressed: () {}, 21 child: Row(children: [ 22 Icon( 23 icon, 24 size: 16, 25 ), 26 SizedBox(width: 4), 27 Text( 28 label, 29 style: TextStyle( 30 fontSize: 14, 31 fontWeight: 32 FontWeight.w200), // Adjust font size for smaller appearance 33 ), 34 ]), 35 ); 36 } 37 }