onPressed: inviteClicked(employee),
should be
onPressed: () => inviteClicked(employee),
to pass a callback function instead of the result of a function call.
onPressed: inviteClicked(employee),
should be
onPressed: () => inviteClicked(employee),
to pass a callback function instead of the result of a function call.