pass parameter change flutter code example
Example: flutter pass onchanged callback in arguments
class DropdownItem extends StatelessWidget {
final Function(bool) onchangedCallback;
// ....
Checkbox(
onChanged: onchangedCallback,
),