Skip to content
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
1 change: 1 addition & 0 deletions example/ios/Flutter/.last_build_id
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24af4cf49375ec5660cdf0e932432046
18 changes: 18 additions & 0 deletions example/ios/Flutter/Flutter.podspec
Original file line number Diff line number Diff line change
@@ -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
11 changes: 6 additions & 5 deletions example/ios/Flutter/flutter_export_environment.sh
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 0 additions & 3 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -321,7 +320,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down Expand Up @@ -377,7 +375,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
Expand Down
4 changes: 4 additions & 0 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class _MyHomePageState extends State<MyHomePage> {
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)),
Expand Down
20 changes: 15 additions & 5 deletions lib/date_picker_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -117,11 +127,11 @@ class _DatePickerState extends State<DatePicker> {
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();
}
Expand Down Expand Up @@ -201,7 +211,7 @@ class _DatePickerState extends State<DatePicker> {
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;
Expand Down
6 changes: 6 additions & 0 deletions lib/extra/style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ environment:
dependencies:
flutter:
sdk: flutter
intl: ^0.16.1
intl: ^0.17.0

dev_dependencies:
flutter_test:
Expand Down