import 'package:flutter/material.dart'; class CodDescDropdownItem extends StatelessWidget { final String? codice; final String? descrizione; const CodDescDropdownItem({ super.key, required this.codice, required this.descrizione, }); @override Widget build(BuildContext context) { final style = DefaultTextStyle.of(context).style; return RichText( text: TextSpan( children: [ TextSpan( text: codice ?? '', style: style.copyWith(fontWeight: FontWeight.bold), ), TextSpan( text: ' ${descrizione ?? ''}', style: style, ), ], ), overflow: TextOverflow.ellipsis, ); } }