I'm using this custom widget package. I have gotten the package to work but i'm quite new to FlutterFlow and don't understand how to use it with dynamic data from an API. I want to pass a parameter and pass the API results through that.
I have imported utils.dart code manually in to the custom widget file since I can't add other files to it. This all works fine.
The section I'm stuck is within the utils.dart file.
final _kEventSource = Map.fromIterable(List.generate(50, (index) => index),
key: (item) => DateTime.utc(kFirstDay.year, kFirstDay.month, item * 5),
value: (item) => List.generate(
item % 4 + 1, (index) => Event('Event $item | ${index + 1}')))
..addAll({
kToday: [
Event('Today\'s Event 1'),
Event('Today\'s Event 2'),
],
});
I think I need to convert this section to somehow accept a parameter.