| 1 | import 'package:flutter/material.dart'; |
| 2 | |
| 3 | class DropDownItemWidget extends StatelessWidget { |
| 4 | const DropDownItemWidget({super.key, required this.title, required this.image}); |
| 5 | final double tileHeight = 60; |
| 6 | final Widget image; |
| 7 | final String title; |
| 8 | |
| 9 | @override |
| 10 | Widget build(BuildContext context) { |
| 11 | return Container( |
| 12 | height: tileHeight, |
| 13 | padding: EdgeInsets.symmetric(horizontal: 20), |
| 14 | child: Row( |
| 15 | crossAxisAlignment: CrossAxisAlignment.center, |
| 16 | mainAxisSize: MainAxisSize.min, |
| 17 | children: <Widget>[ |
| 18 | image, |
| 19 | SizedBox(width: 10), |
| 20 | Flexible( |
| 21 | child: Text( |
| 22 | title, |
| 23 | style: Theme.of(context).textTheme.bodyMedium, |
| 24 | overflow: TextOverflow.ellipsis, |
| 25 | maxLines: 1, |
| 26 | ), |
| 27 | ) |
| 28 | ], |
| 29 | ), |
| 30 | ); |
| 31 | } |
| 32 | } |