Skip to content

Commit

Permalink
fix: 🐛Month view height changes dynamically #141.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaiminrana05 committed Aug 21, 2023
1 parent 6ae1800 commit 17882cf
Show file tree
Hide file tree
Showing 4 changed files with 563 additions and 70 deletions.
38 changes: 31 additions & 7 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ import 'dart:ui';

import 'package:calendar_view/calendar_view.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'model/event.dart';
import 'pages/mobile/mobile_home_page.dart';
import 'pages/web/web_home_page.dart';
import 'widgets/responsive_widget.dart';

DateTime get _now => DateTime.now();

Expand All @@ -31,10 +29,36 @@ class MyApp extends StatelessWidget {
PointerDeviceKind.touch,
},
),
home: ResponsiveWidget(
mobileWidget: MobileHomePage(),
webWidget: WebHomePage(),
),
home: Builder(builder: (context) {
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: SafeArea(
child: Scaffold(
body: CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: MonthView<Event>(
hideExtraWeek: true,
safeAreaOption: SafeAreaOption(top: true, bottom: false),
),
),
SliverFillViewport(
delegate: SliverChildListDelegate([
DayView<Event>(
safeAreaOption: SafeAreaOption(top: false),
),
]),
),
],
)),
),
);
}),

// ResponsiveWidget(
// mobileWidget: MobileHomePage(),
// webWidget: WebHomePage(),
// ),
),
);
}
Expand Down
Loading

0 comments on commit 17882cf

Please sign in to comment.