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

Unwanted space at the top of DayView when used inside a Sliver. #225

Closed
mridboy96 opened this issue May 10, 2023 · 5 comments · Fixed by #251
Closed

Unwanted space at the top of DayView when used inside a Sliver. #225

mridboy96 opened this issue May 10, 2023 · 5 comments · Fixed by #251
Labels
bug Something isn't working

Comments

@mridboy96
Copy link

I have been trying to implement the calendar_view widget in a customScrollView, but for some reason there seems to an unwanted space at the top of the DayView widget.
I am currently using the DayView Widget inside a SliverFillRemaining widget.
I have attached the screenshot and my code below.
Would like to find some help here as to how I can eliminate this extra space that is present above the DayView Widget.

Code Screenshot

Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          CustomScrollView(
            controller: _scrollController,
            physics: NeverScrollableScrollPhysics(),
            slivers: [
              SliverAppBarWidget(
                isAppBarCollapsed: bloc.isAppBarCollapsed,
                activeUserMonogramText: 'AA',
                staticAppBarTitle: 'Schedule',
                actionWidget: InkWell(
                  borderRadius: BorderRadius.circular(20),
                  onTap: () => bloc.openDatePicker(
                      context: context, dateTime: DateTime.now(), dayViewState: calendarViewKey.currentState),
                  splashColor: AppColors.primary.withOpacity(0.5),
                  child: Container(
                    width: MediaQuery.of(context).size.height <= 812 ? 20 : 25,
                    height: MediaQuery.of(context).size.height <= 812 ? 20 : 25,
                    decoration: BoxDecoration(
                      color: AppColors.primarySwatch.shade100,
                      shape: BoxShape.circle,
                    ),
                    child: Center(
                        child: Icon(Icons.calendar_month_sharp,
                            color: AppColors.primary, size: MediaQuery.of(context).size.height <= 812 ? 15 : 17)),
                  ),
                ),
              ),
              SliverFillRemaining(
                child: DayView(
                  controller: _jobCalendarEventController,
                  key: calendarViewKey,
                ),
              )
            ],
          ),
        ],
      ),
    );

Simulator Screenshot - iPhone 14 Pro - 2023-05-10 at 00 19 46

Preview Screenshot

@jaiminrana05
Copy link
Collaborator

Hi @mridboy96, could you kindly share your code snippet for the SliverAppBarWidget?

@jaiminrana05 jaiminrana05 added the waiting-for-resoponse Waiting for someone to respond. label Aug 4, 2023
@mridboy96
Copy link
Author

HI !!
It had been quite a while since I had posted this question.
Ever since then I was able to figure out that in the much later version of the package there is a new option for the DayView widget called safeAreaOption: SafeAreaOption(bottom: false, top: false)
With this specific option I have been able to remove the extra unwanted space that I was initially complaining about
However if I use this specific option, there is some unwanted space that is coming up between the day view and the timeline.
Please see the screenshot for more details.
Would be really helpful if I could get some insights on what is going on and how this can be removed.
Thanks !
Simulator Screenshot - iPhone 11 - 2023-05-16 at 13 04 50

@jaiminrana05
Copy link
Collaborator

jaiminrana05 commented Aug 8, 2023

Hi, @mridboy96. It's great news that your issue has been partially resolved. We are working on your above mention issue.

PRBaraiya added a commit that referenced this issue Aug 9, 2023
…anted_space_in_day_view

fix: 🐛Unwanted space at top of dayView while using sliver #225.
@DhavalRKansara DhavalRKansara linked a pull request Aug 9, 2023 that will close this issue
7 tasks
@DhavalRKansara
Copy link
Collaborator

Hi @mridboy96 We have fixed the issues in the #251 you will find the latest fixes in our latest release 1.0.4

@mridboy96
Copy link
Author

That is great !! Thank you!!
I will pick up the PR #251 and check it out and will confirm here !

@PRBaraiya PRBaraiya added bug Something isn't working and removed waiting-for-resoponse Waiting for someone to respond. labels Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants