How to use dynamic data when using FlutterFlow Table Calendar plugin

270 views Asked by At

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.

0

There are 0 answers