import 'package:flutter/material.dart'; class CustomDropdown extends StatelessWidget { late List? items; late VoidCallback onChanged; String? hint; CustomDropdown( {super.key, required items, required hint, required Null Function() onChanged}); @override Widget build(BuildContext context) { return SizedBox( width: 200, child: DropdownButton( hint: Text(hint!), items: items!.map((String value) { return DropdownMenuItem( value: value, child: Text(value), ); }).toList(), onChanged: (value) { onChanged(); }, ), ); } }