-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚀 add option to provide week days to display in week. #15
🚀 add option to provide week days to display in week. #15
Conversation
I think let's add one more property showWeekend and defaut it to true along with combination of this weekdays array. |
029462c
to
b841745
Compare
CHANGELOG.md
Outdated
@@ -1,3 +1,7 @@ | |||
# 0.0.3 | |||
|
|||
- Add support to choose which days should be displayed in a week in `WeekView`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please mention the issue here
lib/src/extensions.dart
Outdated
final day = weekday; | ||
final start = subtract(Duration(days: day - startDay.index)); | ||
final start = subtract(Duration(days: day - 1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we decreasing 1 day here ?
lib/src/week_view/week_view.dart
Outdated
@@ -264,7 +313,7 @@ class WeekViewState<T> extends State<WeekView<T>> { | |||
onPageChanged: _onPageChange, | |||
itemBuilder: (_, index) { | |||
final dates = _minDate | |||
.add(Duration(days: (index - 1) * _weekDays)) | |||
.add(Duration(days: (index - 1) * 7)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use constant variables instead of direct value
b841745
to
6f1bdc7
Compare
@@ -1,3 +1,7 @@ | |||
# 0.0.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please mention this version as unreleased
final weekDays = this.weekDays.toList() | ||
..sort((d1, d2) => d1.index - d2.index); | ||
|
||
var i = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable name is not appropriate.
54a4334
to
6b5c334
Compare
6b5c334
to
9d854d0
Compare
9d854d0
to
d217c57
Compare
No description provided.