diff --git a/example/ios/Flutter/.last_build_id b/example/ios/Flutter/.last_build_id new file mode 100644 index 0000000..82f5c93 --- /dev/null +++ b/example/ios/Flutter/.last_build_id @@ -0,0 +1 @@ +24af4cf49375ec5660cdf0e932432046 \ No newline at end of file diff --git a/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec new file mode 100644 index 0000000..5ca3041 --- /dev/null +++ b/example/ios/Flutter/Flutter.podspec @@ -0,0 +1,18 @@ +# +# NOTE: This podspec is NOT to be published. It is only used as a local source! +# + +Pod::Spec.new do |s| + s.name = 'Flutter' + s.version = '1.0.0' + s.summary = 'High-performance, high-fidelity mobile apps.' + s.description = <<-DESC +Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. + DESC + s.homepage = 'https://flutter.io' + s.license = { :type => 'MIT' } + s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } + s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } + s.ios.deployment_target = '8.0' + s.vendored_frameworks = 'Flutter.framework' +end diff --git a/example/ios/Flutter/flutter_export_environment.sh b/example/ios/Flutter/flutter_export_environment.sh index 19dd560..99e47fd 100755 --- a/example/ios/Flutter/flutter_export_environment.sh +++ b/example/ios/Flutter/flutter_export_environment.sh @@ -1,15 +1,16 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/Users/vivek/development/flutter" -export "FLUTTER_APPLICATION_PATH=/Users/vivek/StudioProjects/DatePickerTimelineFlutter/example" -export "FLUTTER_TARGET=lib/main.dart" +export "FLUTTER_ROOT=/Users/henno/development/flutter" +export "FLUTTER_APPLICATION_PATH=/Users/henno/Desktop/edit_packages/DatePickerTimelineFlutter/example" +export "FLUTTER_TARGET=/Users/henno/Desktop/edit_packages/DatePickerTimelineFlutter/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/vivek/development/flutter/bin/cache/artifacts/engine/ios" +export "FLUTTER_FRAMEWORK_DIR=/Users/henno/development/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_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=false" +export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" export "PACKAGE_CONFIG=.packages" diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj index 0cf52da..ffec437 100644 --- a/example/ios/Runner.xcodeproj/project.pbxproj +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -247,7 +247,6 @@ /* Begin XCBuildConfiguration section */ 249021D3217E4FDB00AE95B9 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -321,7 +320,6 @@ }; 97C147031CF9000F007C117D /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; @@ -377,7 +375,6 @@ }; 97C147041CF9000F007C117D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; diff --git a/example/lib/main.dart b/example/lib/main.dart index a478f44..aa4d44c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -70,6 +70,10 @@ class _MyHomePageState extends State { initialSelectedDate: DateTime.now(), selectionColor: Colors.black, selectedTextColor: Colors.white, + // deactivatedStyle: TextStyle(fontWeight: FontWeight.bold), + // deactivatedColor: Colors.white, + // deactivatedBackgroundColor :Colors.green, + inactiveDates: [ DateTime.now().add(Duration(days: 3)), DateTime.now().add(Duration(days: 4)), diff --git a/lib/date_picker_widget.dart b/lib/date_picker_widget.dart index 0eccf67..f2cbea3 100644 --- a/lib/date_picker_widget.dart +++ b/lib/date_picker_widget.dart @@ -25,9 +25,17 @@ class DatePicker extends StatefulWidget { /// Background color for the selector final Color selectionColor; - /// Text Color for the deactivated dates + /// TextStyle for the deactivated dates final Color deactivatedColor; + /// Background Color for the deactivated dates + final Color deactivatedBackgroundColor; + + + /// Text Color for the deactivated dates + final TextStyle deactivatedStyle; + + /// TextStyle for Month Value final TextStyle monthTextStyle; @@ -68,8 +76,10 @@ class DatePicker extends StatefulWidget { this.dayTextStyle = defaultDayTextStyle, this.dateTextStyle = defaultDateTextStyle, this.selectedTextColor = Colors.white, + this.deactivatedBackgroundColor = Colors.transparent, this.selectionColor = AppColors.defaultSelectionColor, this.deactivatedColor = AppColors.defaultDeactivatedColor, + this.deactivatedStyle=defaultDeactiveDateTextStyle, this.initialSelectedDate, this.activeDates, this.inactiveDates, @@ -117,11 +127,11 @@ class _DatePickerState extends State { createTextStyle(widget.dayTextStyle, widget.selectedTextColor); this.deactivatedDateStyle = - createTextStyle(widget.dateTextStyle, widget.deactivatedColor); + createTextStyle(widget.deactivatedStyle, widget.deactivatedColor); this.deactivatedMonthStyle = - createTextStyle(widget.monthTextStyle, widget.deactivatedColor); + createTextStyle(widget.deactivatedStyle, widget.deactivatedColor); this.deactivatedDayStyle = - createTextStyle(widget.dayTextStyle, widget.deactivatedColor); + createTextStyle(widget.deactivatedStyle, widget.deactivatedColor); super.initState(); } @@ -201,7 +211,7 @@ class _DatePickerState extends State { width: widget.width, locale: widget.locale, selectionColor: - isSelected ? widget.selectionColor : Colors.transparent, + isSelected ? widget.selectionColor : isDeactivated?widget.deactivatedBackgroundColor : Colors.transparent, onDateSelected: (selectedDate) { // Don't notify listener if date is deactivated if (isDeactivated) return; diff --git a/lib/extra/style.dart b/lib/extra/style.dart index a72aa53..79f4fd2 100644 --- a/lib/extra/style.dart +++ b/lib/extra/style.dart @@ -19,3 +19,9 @@ const TextStyle defaultDayTextStyle = TextStyle( fontSize: Dimen.dayTextSize, fontWeight: FontWeight.w500, ); + +const TextStyle defaultDeactiveDateTextStyle = TextStyle( + color: AppColors.defaultDayColor, + fontSize: Dimen.dayTextSize, + fontWeight: FontWeight.w500, +); diff --git a/pubspec.yaml b/pubspec.yaml index 46973b5..c0a4e0a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -9,7 +9,7 @@ environment: dependencies: flutter: sdk: flutter - intl: ^0.16.1 + intl: ^0.17.0 dev_dependencies: flutter_test: