Flari
Flari

Reputation: 312

How to make a horizonta week slider with daily view in flutter

So I am in a project and I need to make a daily view of the schedule of someone, the problem is that the same page also requires a horizontal slider of the week days, more or less. My problem is that I dont know how to make the slider, it should be something like the image, pointed out by the arrow. enter image description here

The problem that I found with the libraries I tried so far is that none of tham have a customizeable slider or a slider in daily view at all. Here are the libraries.

  syncfusion_flutter_calendar: ^19.2.55
  flutter_week_view: ^1.1.0
  weekday_selector: ^1.0.0

Is there a way to make such slider (that also changes the view below) or any libraries that can be customized and have such view?

Upvotes: 1

Views: 719

Answers (1)

MindStudio
MindStudio

Reputation: 786

Make a List<WeekDay> of all the weekdays you want in your slider. (you can update it dynamically)

For the Slider Widget you can use a horizontal ListView that returns your weekdaywidget for each element of the List. You can make it clickable with a GestureDetector and onTap(() {}) and set the selectedWeekday to display different tasks based on selectedWeekdaybelow.

You would have to implement the WeekDay class your self or use the DateTime class instead.

Upvotes: 2

Related Questions