diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist index 9367d483..7c569640 100644 --- a/example/ios/Flutter/AppFrameworkInfo.plist +++ b/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 12.0 diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index da2211a4..02248285 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -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/trdevendran/development/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/trdevendran/Documents/workspace/flutter/plugins/flutter_datetime_picker/example" +export "COCOAPODS_PARALLEL_CODE_SIGN=true" +export "FLUTTER_TARGET=/Users/trdevendran/Documents/workspace/flutter/plugins/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=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQ0FOVkFTS0lUX1VSTD1odHRwczovL3d3dy5nc3RhdGljLmNvbS9mbHV0dGVyLWNhbnZhc2tpdC9mNjM0NGI3NWRjZjg2MWQ4YmYxZjEzMjI3ODBiODgxMWY5ODJlMzFhLw==" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.packages" +export "PACKAGE_CONFIG=/Users/trdevendran/Documents/workspace/flutter/plugins/flutter_datetime_picker/example/.dart_tool/package_config.json" diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 1c85b6d7..697191bf 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -140,7 +140,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0910; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -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 = ( @@ -198,6 +200,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -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 = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -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 = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16..919434a6 100644 --- a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 1263ac84..7033c691 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + diff --git a/example/lib/main.dart b/example/lib/main.dart index 1ab0e793..dc59a3cb 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -108,7 +108,7 @@ class HomePage extends StatelessWidget { showTitleActions: true, minTime: DateTime(2018, 3, 5), maxTime: DateTime(2019, 6, 7), - theme: DatePickerTheme( + theme: CustomDatePickerTheme( headerColor: Colors.orange, backgroundColor: Colors.blue, itemStyle: TextStyle( diff --git a/lib/flutter_datetime_picker.dart b/lib/flutter_datetime_picker.dart index dba6b566..7577b416 100644 --- a/lib/flutter_datetime_picker.dart +++ b/lib/flutter_datetime_picker.dart @@ -1,15 +1,15 @@ library flutter_datetime_picker; 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/date_model.dart'; +import 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; import 'package:flutter_datetime_picker/src/i18n_model.dart'; -export 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; export 'package:flutter_datetime_picker/src/date_model.dart'; +export 'package:flutter_datetime_picker/src/datetime_picker_theme.dart'; export 'package:flutter_datetime_picker/src/i18n_model.dart'; typedef DateChangedCallback(DateTime time); @@ -30,7 +30,7 @@ class DatePicker { DateCancelledCallback? onCancel, locale: LocaleType.en, DateTime? currentTime, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, }) async { return await Navigator.push( context, @@ -65,7 +65,7 @@ class DatePicker { DateCancelledCallback? onCancel, locale: LocaleType.en, DateTime? currentTime, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, }) async { return await Navigator.push( context, @@ -98,7 +98,7 @@ class DatePicker { DateCancelledCallback? onCancel, locale: LocaleType.en, DateTime? currentTime, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, }) async { return await Navigator.push( context, @@ -132,7 +132,7 @@ class DatePicker { DateCancelledCallback? onCancel, locale: LocaleType.en, DateTime? currentTime, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, }) async { return await Navigator.push( context, @@ -166,7 +166,7 @@ class DatePicker { DateCancelledCallback? onCancel, locale: LocaleType.en, BasePickerModel? pickerModel, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, }) async { return await Navigator.push( context, @@ -191,13 +191,13 @@ class _DatePickerRoute extends PopupRoute { this.onChanged, this.onConfirm, this.onCancel, - DatePickerTheme? theme, + CustomDatePickerTheme? theme, this.barrierLabel, this.locale, RouteSettings? settings, BasePickerModel? pickerModel, }) : this.pickerModel = pickerModel ?? DatePickerModel(), - this.theme = theme ?? DatePickerTheme(), + this.theme = theme ?? CustomDatePickerTheme(), super(settings: settings); final bool? showTitleActions; @@ -205,7 +205,7 @@ class _DatePickerRoute extends PopupRoute { final DateChangedCallback? onConfirm; final DateCancelledCallback? onCancel; final LocaleType? locale; - final DatePickerTheme theme; + final CustomDatePickerTheme theme; final BasePickerModel pickerModel; @override @@ -293,7 +293,7 @@ class _DatePickerState extends State<_DatePickerComponent> { @override Widget build(BuildContext context) { - DatePickerTheme theme = widget.route.theme; + CustomDatePickerTheme theme = widget.route.theme; return GestureDetector( child: AnimatedBuilder( animation: widget.route.animation!, @@ -326,7 +326,7 @@ class _DatePickerState extends State<_DatePickerComponent> { } } - Widget _renderPickerView(DatePickerTheme theme) { + Widget _renderPickerView(CustomDatePickerTheme theme) { Widget itemView = _renderItemView(theme); if (widget.route.showTitleActions == true) { return Column( @@ -341,7 +341,7 @@ class _DatePickerState extends State<_DatePickerComponent> { Widget _renderColumnView( ValueKey key, - DatePickerTheme theme, + CustomDatePickerTheme theme, StringAtIndexCallBack stringAtIndexCB, ScrollController scrollController, int layoutProportion, @@ -396,7 +396,7 @@ class _DatePickerState extends State<_DatePickerComponent> { ); } - Widget _renderItemView(DatePickerTheme theme) { + Widget _renderItemView(CustomDatePickerTheme theme) { return Container( color: theme.backgroundColor, child: Directionality( @@ -471,7 +471,7 @@ class _DatePickerState extends State<_DatePickerComponent> { } // Title View - Widget _renderTitleActionsView(DatePickerTheme theme) { + Widget _renderTitleActionsView(CustomDatePickerTheme theme) { final done = _localeDone(); final cancel = _localeCancel(); @@ -543,7 +543,7 @@ class _BottomPickerLayout extends SingleChildLayoutDelegate { final double progress; final int? itemCount; final bool? showTitleActions; - final DatePickerTheme theme; + final CustomDatePickerTheme theme; final double bottomPadding; @override diff --git a/lib/src/datetime_picker_theme.dart b/lib/src/datetime_picker_theme.dart index e3f616f4..a37b2655 100644 --- a/lib/src/datetime_picker_theme.dart +++ b/lib/src/datetime_picker_theme.dart @@ -3,7 +3,7 @@ import 'package:flutter/material.dart'; // Migrate DiagnosticableMixin to Diagnosticable until // https://github.com/flutter/flutter/pull/51495 makes it into stable (v1.15.21) -class DatePickerTheme with DiagnosticableTreeMixin { +class CustomDatePickerTheme with DiagnosticableTreeMixin { final TextStyle cancelStyle; final TextStyle doneStyle; final TextStyle itemStyle; @@ -14,7 +14,7 @@ class DatePickerTheme with DiagnosticableTreeMixin { final double titleHeight; final double itemHeight; - const DatePickerTheme({ + const CustomDatePickerTheme({ this.cancelStyle = const TextStyle(color: Colors.black54, fontSize: 16), this.doneStyle = const TextStyle(color: Colors.blue, fontSize: 16), this.itemStyle = const TextStyle(color: Color(0xFF000046), fontSize: 18),