0
4

1 回答 1

1

Dart 2.12 added stricter type checking to catch cases where callbacks return unused values.

IconButton.onPressed is a VoidCallback?; that is, if it isn't null, it is a function that returns nothing.

You are supplying an anonymous function that has return polygonList; in it. That returned value can never be used, so the return statement is useless. Simply remove it.

于 2021-05-18T12:37:01.227 回答