Skip to content

bug fixed #101

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file should not be added to repo. It is your local settings.

# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=C:\Users\dhruv\fvm\versions\2.8.1"
export "FLUTTER_APPLICATION_PATH=C:\Users\dhruv\OneDrive\Desktop\flutter_date_pickers\example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
28 changes: 14 additions & 14 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -68,7 +68,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.3.0"
version: "0.4.0"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -100,13 +100,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
meta:
dependency: transitive
description:
Expand All @@ -120,7 +113,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -132,7 +125,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -167,14 +160,21 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.3"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.1"
sdks:
dart: ">=2.17.0-0 <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
49 changes: 29 additions & 20 deletions lib/src/day_based_changable_picker.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:ffi';

import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
Expand Down Expand Up @@ -65,6 +66,8 @@ class DayBasedChangeablePicker<T> extends StatefulWidget {

/// Called when the user changes the month
final ValueChanged<DateTime>? onMonthChanged;

final double? spacing;

/// Create picker with option to change month.
DayBasedChangeablePicker({
Expand All @@ -81,6 +84,7 @@ class DayBasedChangeablePicker<T> extends StatefulWidget {
this.onSelectionError,
this.eventDecorationBuilder,
this.onMonthChanged,
this.spacing = 40.0,
}) : initiallyShowDate =
_getInitiallyShownDate(initiallyShownDate, selection),
super(key: key);
Expand Down Expand Up @@ -166,27 +170,32 @@ class _DayBasedChangeablePickerState<T>
// ignore: prefer_expression_function_bodies
Widget build(BuildContext context) {
return SizedBox(
width: widget.datePickerLayoutSettings.monthPickerPortraitWidth,
height: widget.datePickerLayoutSettings.maxDayPickerHeight,
child: Column(
children: <Widget>[
widget.datePickerLayoutSettings.hideMonthNavigationRow
? const SizedBox()
: SizedBox(
height: widget.datePickerLayoutSettings.dayPickerRowHeight,
child: Padding(
//match _DayPicker main layout padding
padding: widget.datePickerLayoutSettings.contentPadding,
child: _buildMonthNavigationRow()),
),
Expanded(
child: Semantics(
sortKey: MonthPickerSortKey.calendar,
child: _buildDayPickerPageView(),
),
width: widget.datePickerLayoutSettings.monthPickerPortraitWidth,
height: widget.datePickerLayoutSettings.maxDayPickerHeight,
child: Column(
children: <Widget>[
widget.datePickerLayoutSettings.hideMonthNavigationRow
? const SizedBox()
: SizedBox(
height: widget.datePickerLayoutSettings.dayPickerRowHeight,
child: Padding(
//match _DayPicker main layout padding
padding: widget.datePickerLayoutSettings.contentPadding,
child: _buildMonthNavigationRow()),
),
SizedBox(
height: widget.spacing,
width: double.infinity,
),
Expanded(
child: Semantics(
sortKey: MonthPickerSortKey.calendar,
child: _buildDayPickerPageView(),
),
],
));
),
],
),
);
}

@override
Expand Down
10 changes: 5 additions & 5 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ packages:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
charcode:
dependency: transitive
description:
Expand Down Expand Up @@ -78,7 +78,7 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
version: "0.12.11"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -139,7 +139,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.3"
typed_data:
dependency: transitive
description:
Expand All @@ -153,6 +153,6 @@ packages:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
version: "2.1.1"
sdks:
dart: ">=2.12.0 <3.0.0"
dart: ">=2.14.0 <3.0.0"