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 14, 2023
1 parent 6ae1800 commit 0279be6
Show file tree
Hide file tree
Showing 3 changed files with 549 additions and 78 deletions.
32 changes: 25 additions & 7 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import 'package:calendar_view/calendar_view.dart';
import 'package:flutter/material.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 +28,31 @@ class MyApp extends StatelessWidget {
PointerDeviceKind.touch,
},
),
home: ResponsiveWidget(
mobileWidget: MobileHomePage(),
webWidget: WebHomePage(),
),
home: Builder(builder: (context) {
return Scaffold(
body: CustomScrollView(
slivers: [
SliverToBoxAdapter(
child: MonthView<Event>(
isResize: true,
safeAreaOption: SafeAreaOption(top:true,bottom: false),
),
),
SliverFillViewport(
delegate: SliverChildListDelegate([
DayView<Event>(
safeAreaOption: SafeAreaOption(top: false),
),
]),
),
],
));
}),

// ResponsiveWidget(
// mobileWidget: MobileHomePage(),
// webWidget: WebHomePage(),
// ),
),
);
}
Expand Down
1 change: 1 addition & 0 deletions lib/src/components/month_view_components.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class FilledCell<T extends Object?> extends StatelessWidget {
return Container(
color: backgroundColor,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: 5.0,
Expand Down
Loading

0 comments on commit 0279be6

Please sign in to comment.