Mosses
 · [moe-zus]

How to assign a Parameter Type when it's a function for a custom widget?

Custom Code
Resolved

Related to: https://community.flutterflow.io/ask-the-community/post/how-to-get-out-of-pub-dev-package-dependency-issues-G6javtIn7CWSJIF

After successfully adding and compiling a pub.dev package for a new custom widget, it's time to add parameters. The straightforward ones are easy, such as assigning a Color to a parameter named bottomCardColor. However, I'm unsure how to assign a Parameter Type when it's a function. Here's a snippet for reference:

// Bottom card color
final Color? bottomCardColor;

/// On Suggestion Selected callback
final Function(PlacesDetailsResponse?)? onSuggestionSelected;
What have you tried so far?

Scoured the web.

Did you check FlutterFlow's Documentation for this topic?
Yes
3
1 reply