Skip to content
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

Conversation

ParthBaraiya
Copy link
Collaborator

No description provided.

@sanket-simform
Copy link

I think let's add one more property showWeekend and defaut it to true along with combination of this weekdays array.

@ParthBaraiya ParthBaraiya force-pushed the feature/add_weekday_option branch 3 times, most recently from 029462c to b841745 Compare September 16, 2021 09:24
CHANGELOG.md Outdated
@@ -1,3 +1,7 @@
# 0.0.3

- Add support to choose which days should be displayed in a week in `WeekView`.

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

final day = weekday;
final start = subtract(Duration(days: day - startDay.index));
final start = subtract(Duration(days: day - 1));

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 ?

@@ -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))

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

@@ -1,3 +1,7 @@
# 0.0.3

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;

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.

@ParthBaraiya ParthBaraiya force-pushed the feature/add_weekday_option branch 2 times, most recently from 54a4334 to 6b5c334 Compare October 14, 2021 09:03
@vatsaltanna-simformsolutions vatsaltanna-simformsolutions merged commit b09d38a into SimformSolutionsPvtLtd:master Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give the option to show weekdays in a weekview.
4 participants