passing arguments back in flutter code example
Example 1: flutter pass onchanged callback in arguments
class DropdownItem extends StatelessWidget {
final Function(bool) onchangedCallback;
// ....
Checkbox(
onChanged: onchangedCallback,
),
Example 2: callback with arguments flutter
onTap: () => callback(params)