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

example of dateFormatter #16

Closed FernandaMayumi closed 4 years ago

FernandaMayumi commented 4 years ago

Could you write an example of what the dateFormatter entry would look like?

Skyost commented 4 years ago

See here.

DayView(
  date: DateTime.now(),
  events: [],
  dateFormatter: (year, month, day) => year.toString() + '/' + addLeadingZero(month) + '/' + addLeadingZero(day),
);

With the addLeadingZero function looking like this :

String addLeadingZero(int number) => (number < 10 ? '0' : '') + number.toString();
FernandaMayumi commented 4 years ago

It helped me, thank you!