diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh new file mode 100644 index 0000000..bc9859a --- /dev/null +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# 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" diff --git a/example/pubspec.lock b/example/pubspec.lock index a7c4b91..14ba300 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -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 @@ -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 @@ -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: @@ -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 @@ -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: @@ -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" diff --git a/lib/src/day_based_changable_picker.dart b/lib/src/day_based_changable_picker.dart index 631f82b..adef506 100644 --- a/lib/src/day_based_changable_picker.dart +++ b/lib/src/day_based_changable_picker.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:ffi'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -65,6 +66,8 @@ class DayBasedChangeablePicker extends StatefulWidget { /// Called when the user changes the month final ValueChanged? onMonthChanged; + + final double? spacing; /// Create picker with option to change month. DayBasedChangeablePicker({ @@ -81,6 +84,7 @@ class DayBasedChangeablePicker extends StatefulWidget { this.onSelectionError, this.eventDecorationBuilder, this.onMonthChanged, + this.spacing = 40.0, }) : initiallyShowDate = _getInitiallyShownDate(initiallyShownDate, selection), super(key: key); @@ -166,27 +170,32 @@ class _DayBasedChangeablePickerState // ignore: prefer_expression_function_bodies Widget build(BuildContext context) { return SizedBox( - width: widget.datePickerLayoutSettings.monthPickerPortraitWidth, - height: widget.datePickerLayoutSettings.maxDayPickerHeight, - child: Column( - children: [ - 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.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 diff --git a/pubspec.lock b/pubspec.lock index 6bd166a..5c56907 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: @@ -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: @@ -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: @@ -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"