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

Be able to create custom horizontal rule and time inidicator with builders #51

Closed Dekhnar closed 4 years ago

Dekhnar commented 4 years ago

I'm trying to customize the horizontal hour displayed in the left and the indicator. I want to be able to give my own Widget builder as parameters for creating specific createCurrentTimeRule and createCurrentTimeCircle to match my specific UI.

Is there a way to do this ?

Skyost commented 4 years ago

Is there a way to do this ?

Currently not but I may provide a way using DayViewStyle (something similar to this). Are you okay with that ? Or if you have a better way, feel free to make your suggestions.

Dekhnar commented 4 years ago

I think you can expose a final DayViewBuilders builders; as parameter, if builders are provided you use them. typedef Builder = Widget Function(BuildContext context);

class DayViewBuilders {
  final Builder hourBuilder; /// Custom Builder can overide this HoursColumn.fromHeadersWidgetState(parent: this) for example
  final Builder indicatorBuilder;   /// Custom Builder can overwrite `container` in createCurrentTimeCircle for example.
}
Dekhnar commented 4 years ago

Exactly what i need thanks @Skyost.

Skyost commented 4 years ago

@Dekhnar No problem, feel free to test it and report me any bug you encounter :wink: