Flutter onPressed of a Button on a ListView gets called automatically (when it becomes visible). Is this a bug?

 onPressed: inviteClicked(employee),

should be

 onPressed: () => inviteClicked(employee),

to pass a callback function instead of the result of a function call.

Leave a Reply

邮箱地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>