mobileApplicationsKonectarApp/lib/widgets/customdropdown.dart

31 lines
651 B
Dart
Raw Normal View History

2024-01-04 07:06:37 +00:00
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();
},
),
);
}
}