0

The Picture shows how it should look like. But in my App, the agenda is inside a TAB!

this is how it schould look like at the end. except my agenda is inside a TabCan anyone tell me why my code wont work?

I am trying to display data from DataSource but it wont show up! (SFCalendar - Custom Agenda)

(Basically - to get it to show my appointments in a separate widget "far up the tree" <onTap: calendarTapped>)

I recreated the code on github since its too much code for stackoverflow - i guess its easier with vcs anyway:

https://github.com/panval/sfcalcustagenda.git

I simply can't manage to get it to work! What am I missing?

Val
  • 31
  • 1
  • 7
  • what would be your expected out, maybe you can create a minimal snippet and include on question – Md. Yeasin Sheikh Feb 11 '23 at 13:51
  • @YeasinSheikh - sure - I edited my question. Maybe you can find a solution. I recon it's something about state -(I'm new to coding - this might be an easy solution) – Val Feb 12 '23 at 03:37

1 Answers1

0

You arent passing the selected item on Tabs widget. You can use constructor the way you did for CustomAgenda.

class Tabs extends StatefulWidget {
  Tabs({Key? key, required this.appointmentDetails});

and use

   CustomAgenda(appointmentDetails: widget.appointmentDetails),

You can remove the state variable from here.

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56