Skyost / FlutterWeekView

Displays a highly customizable week view (or day view) which is able to display events, to be scrolled, to be zoomed-in & out and a lot more !
https://pub.dev/packages/flutter_week_view
MIT License
208 stars 89 forks source link

How to use the dayBarStyleBuilder #75

Closed scshivam closed 3 years ago

scshivam commented 3 years ago

Please provide some example code to use the dayBarStyleBuilder.

Skyost commented 3 years ago

Yep. First, you have to understand that DayBarStyleBuilder is a function that accepts a DateTime and returns a DayBarStyle (see here). Here's a such function.

So if you want to use it as an argument, just write something like this :

dayBarStyleBuilder: (date) {
  // Get whatever info you want about this date...
  return const DayBarStyle();
}