How to Pass a Widget as a Parameter to a Custom Widget in FlutterFlow

Hello FlutterFlow Community,

I'm currently working on a custom widget in FlutterFlow that requires a child widget to be passed as a parameter, similar to how one would use a Container or ClipRRect in standard Flutter code. I want this custom widget to be reusable with any child widget I choose to place inside of it.

Could anyone guide me on how to achieve this within FlutterFlow's custom widget environment? I'm not seeing a direct option to pass a Widget type parameter in the custom widget settings. Does FlutterFlow support this kind of functionality, and if so, what would be the best approach to pass a widget as a parameter? Additionally, are there pubspec dependencies that I can utilize for this purpose?

Any advice or pointers towards relevant documentation would be greatly appreciated!

Thank you!

9
3 replies