Santos-Enoque / flutter-web-dashboard-template

270 stars 202 forks source link

final Function onTap #31

Open amyork1990 opened 2 years ago

amyork1990 commented 2 years ago

Hi there,

There is an error when you are adding variables in the classes horizontal_menu_item, and menu_item. The variable defined is "final Function onTap"

In the InkWell(), there is an error on the parameter onTap : onTap.

The defined error is: "argument type 'Function' can't be assigned to the parameter type 'void Function()?'."

The solution is changing the type of the variable from "final Function onTap" to "final VoidCallback() onTap"

Thank you for everything so far, really appreciated!!

aditya-wappnet commented 1 year ago

Yes you can achieve that by doing void function()?

Tonouewa-kefil commented 1 year ago

It should be final Function() onTap