31 lines
651 B
Dart
31 lines
651 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CustomDropdown extends StatelessWidget {
|
|
List<String> items = [];
|
|
late VoidCallback onChanged;
|
|
String? hint;
|
|
CustomDropdown({
|
|
super.key,
|
|
required items,
|
|
required hint,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return SizedBox(
|
|
width: 200,
|
|
child: DropdownButton<String>(
|
|
items: ["Face to face", "phone"].map((String value) {
|
|
return DropdownMenuItem<String>(
|
|
value: value,
|
|
child: Text(value),
|
|
);
|
|
}).toList(),
|
|
onChanged: (value) {
|
|
onChanged();
|
|
},
|
|
),
|
|
);
|
|
}
|
|
}
|