| 1 | import 'package:flutter/material.dart'; |
| 2 | |
| 3 | class InfoChip extends StatelessWidget { |
| 4 | final String label; |
| 5 | final IconData icon; |
| 6 | final VoidCallback onPressed; |
| 7 | |
| 8 | const InfoChip({ |
| 9 | super.key, |
| 10 | required this.label, |
| 11 | required this.icon, |
| 12 | required this.onPressed, |
| 13 | }); |
| 14 | |
| 15 | @override |
| 16 | Widget build(BuildContext context) => Container( |
| 17 | decoration: BoxDecoration( |
| 18 | borderRadius: BorderRadius.circular(100), |
| 19 | color: Theme.of(context).colorScheme.surfaceContainer, |
| 20 | ), |
| 21 | padding: const EdgeInsets.fromLTRB(12, 6, 12, 6), |
| 22 | child: InkWell( |
| 23 | onTap: onPressed, |
| 24 | child: Row( |
| 25 | children: [ |
| 26 | Padding( |
| 27 | padding: const EdgeInsets.only(right: 5), |
| 28 | child: Icon( |
| 29 | icon, |
| 30 | color: Theme.of(context).colorScheme.onSurface, |
| 31 | ), |
| 32 | ), |
| 33 | Text( |
| 34 | label, |
| 35 | style: Theme.of(context).textTheme.bodyMedium, |
| 36 | ), |
| 37 | ], |
| 38 | ), |
| 39 | ), |
| 40 | ); |
| 41 | } |