Skip to content

fixed issue #332, DatePickerTheme is imported from both #335

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 1 commit 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
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>8.0</string>
<string>11.0</string>
</dict>
</plist>
14 changes: 6 additions & 8 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/liuyanbo/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/liuyanbo/Documents/GitHub/flutter_datetime_picker/example"
export "FLUTTER_TARGET=/Users/liuyanbo/Documents/GitHub/flutter_datetime_picker/example/lib/main.dart"
export "FLUTTER_ROOT=/Users/jibin/Development/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/jibin/Work/Git Courses/flutter_datetime_picker/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=/Users/jibin/Work/Git Courses/flutter_datetime_picker/example/lib/main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
export "FLUTTER_FRAMEWORK_DIR=/Users/liuyanbo/flutter/bin/cache/artifacts/engine/ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue"
export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC85MDY0NDU5YThiMGRjZDMyODc3MTA3ZjYwMDJjYzQyOWE3MTY1OWQxLw=="
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=.packages"
export "PACKAGE_CONFIG=/Users/jibin/Work/Git Courses/flutter_datetime_picker/example/.dart_tool/package_config.json"
11 changes: 7 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -140,7 +140,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0910;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -184,10 +184,12 @@
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
Expand All @@ -198,6 +200,7 @@
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
Expand Down Expand Up @@ -290,7 +293,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -337,7 +340,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 4 additions & 0 deletions example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>
4 changes: 3 additions & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'
as datepickertheme;

void main() => runApp(new MyApp());

Expand Down Expand Up @@ -108,7 +110,7 @@ class HomePage extends StatelessWidget {
showTitleActions: true,
minTime: DateTime(2018, 3, 5),
maxTime: DateTime(2019, 6, 7),
theme: DatePickerTheme(
theme: datepickertheme.DatePickerTheme(
headerColor: Colors.orange,
backgroundColor: Colors.blue,
itemStyle: TextStyle(
Expand Down
31 changes: 16 additions & 15 deletions lib/flutter_datetime_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart';
import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'
as datepickertheme;
import 'package:flutter_datetime_picker/src/date_model.dart';
import 'package:flutter_datetime_picker/src/i18n_model.dart';

Expand All @@ -30,7 +31,7 @@ class DatePicker {
DateCancelledCallback? onCancel,
locale: LocaleType.en,
DateTime? currentTime,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
}) async {
return await Navigator.push(
context,
Expand Down Expand Up @@ -65,7 +66,7 @@ class DatePicker {
DateCancelledCallback? onCancel,
locale: LocaleType.en,
DateTime? currentTime,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
}) async {
return await Navigator.push(
context,
Expand Down Expand Up @@ -98,7 +99,7 @@ class DatePicker {
DateCancelledCallback? onCancel,
locale: LocaleType.en,
DateTime? currentTime,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
}) async {
return await Navigator.push(
context,
Expand Down Expand Up @@ -132,7 +133,7 @@ class DatePicker {
DateCancelledCallback? onCancel,
locale: LocaleType.en,
DateTime? currentTime,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
}) async {
return await Navigator.push(
context,
Expand Down Expand Up @@ -166,7 +167,7 @@ class DatePicker {
DateCancelledCallback? onCancel,
locale: LocaleType.en,
BasePickerModel? pickerModel,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
}) async {
return await Navigator.push(
context,
Expand All @@ -191,21 +192,21 @@ class _DatePickerRoute<T> extends PopupRoute<T> {
this.onChanged,
this.onConfirm,
this.onCancel,
DatePickerTheme? theme,
datepickertheme.DatePickerTheme? theme,
this.barrierLabel,
this.locale,
RouteSettings? settings,
BasePickerModel? pickerModel,
}) : this.pickerModel = pickerModel ?? DatePickerModel(),
this.theme = theme ?? DatePickerTheme(),
this.theme = theme ?? datepickertheme.DatePickerTheme(),
super(settings: settings);

final bool? showTitleActions;
final DateChangedCallback? onChanged;
final DateChangedCallback? onConfirm;
final DateCancelledCallback? onCancel;
final LocaleType? locale;
final DatePickerTheme theme;
final datepickertheme.DatePickerTheme theme;
final BasePickerModel pickerModel;

@override
Expand Down Expand Up @@ -293,7 +294,7 @@ class _DatePickerState extends State<_DatePickerComponent> {

@override
Widget build(BuildContext context) {
DatePickerTheme theme = widget.route.theme;
datepickertheme.DatePickerTheme theme = widget.route.theme;
return GestureDetector(
child: AnimatedBuilder(
animation: widget.route.animation!,
Expand Down Expand Up @@ -326,7 +327,7 @@ class _DatePickerState extends State<_DatePickerComponent> {
}
}

Widget _renderPickerView(DatePickerTheme theme) {
Widget _renderPickerView(datepickertheme.DatePickerTheme theme) {
Widget itemView = _renderItemView(theme);
if (widget.route.showTitleActions == true) {
return Column(
Expand All @@ -341,7 +342,7 @@ class _DatePickerState extends State<_DatePickerComponent> {

Widget _renderColumnView(
ValueKey key,
DatePickerTheme theme,
datepickertheme.DatePickerTheme theme,
StringAtIndexCallBack stringAtIndexCB,
ScrollController scrollController,
int layoutProportion,
Expand Down Expand Up @@ -396,7 +397,7 @@ class _DatePickerState extends State<_DatePickerComponent> {
);
}

Widget _renderItemView(DatePickerTheme theme) {
Widget _renderItemView(datepickertheme.DatePickerTheme theme) {
return Container(
color: theme.backgroundColor,
child: Directionality(
Expand Down Expand Up @@ -471,7 +472,7 @@ class _DatePickerState extends State<_DatePickerComponent> {
}

// Title View
Widget _renderTitleActionsView(DatePickerTheme theme) {
Widget _renderTitleActionsView(datepickertheme.DatePickerTheme theme) {
final done = _localeDone();
final cancel = _localeCancel();

Expand Down Expand Up @@ -543,7 +544,7 @@ class _BottomPickerLayout extends SingleChildLayoutDelegate {
final double progress;
final int? itemCount;
final bool? showTitleActions;
final DatePickerTheme theme;
final datepickertheme.DatePickerTheme theme;
final double bottomPadding;

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_datetime_picker
description: A date time picker for flutter, you can choose date / time / date&time in English Dutch and Chinese, and you can also custom your own picker content
version: 1.5.1
version: 1.5.2
homepage: https://github.com/Realank/flutter_datetime_picker

environment:
Expand Down