Skip to content
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

Fix divider position #56

Open
wants to merge 5 commits 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
.fvm/

# IntelliJ related
*.iml
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## [1.1.2]
* Fix deprecated code.

## [1.1.1]
* Fix divider position.

## [1.1.0]
* Merged issue #53 (Incorrect month selected not same on picker display).

## [1.0.6]
* Updated `DatePicker.localeFromString` function with the missing locales.

Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# flutter_holo_date_picker
# flutter_holo_date_picker_widget

A Flutter package of Datepicker inspired by the Holo Theme in Android.
A Flutter package of Datepicker inspired by the Holo Theme in Android.

This package is a clone of [flutter_holo_date_picker](https://pub.dev/packages/flutter_holo_date_picker) with small adjustment.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion example/lib/date_testing.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_holo_date_picker/flutter_holo_date_picker.dart';
import 'package:flutter_holo_date_picker_widget/flutter_holo_date_picker_widget.dart';
import 'package:intl/intl.dart';

class DateTesting extends StatefulWidget {
Expand Down
4 changes: 2 additions & 2 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_holo_date_picker/flutter_holo_date_picker.dart';
import 'package:flutter_holo_date_picker_widget/flutter_holo_date_picker_widget.dart';

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

Expand All @@ -13,7 +13,7 @@ class MyApp extends StatelessWidget {
// home: DateTesting(),
home: Scaffold(
appBar: AppBar(
title: Text('Holo Datepicker Example'),
title: Text('Holo Date Picker Example'),
),
body: MyHomePage(),
),
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: holo_date_picker_example
description: flutter_holo_date_picker package exmaple project
description: flutter_holo_date_picker_widget package exmaple project

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
Expand All @@ -24,7 +24,7 @@ dependencies:
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2

flutter_holo_date_picker:
flutter_holo_date_picker_widget:
path: ../

intl: ^0.17.0
Expand Down
4 changes: 2 additions & 2 deletions lib/date_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ class DatePicker {
DateTime? _selectedDate = initialDate;
final List<Widget> listButtonActions = [
TextButton(
style: TextButton.styleFrom(primary: textColor),
style: TextButton.styleFrom(foregroundColor: textColor),
child: Text(confirmText ?? "OK"),
onPressed: () {
Navigator.pop(context, _selectedDate);
},
),
TextButton(
style: TextButton.styleFrom(primary: textColor),
style: TextButton.styleFrom(foregroundColor: textColor),
child: Text(cancelText ?? "Cancel"),
onPressed: () {
Navigator.pop(context);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library flutter_holo_date_picker;
library flutter_holo_date_picker_widget;

export 'date_picker.dart';
export 'i18n/date_picker_i18n.dart';
Expand Down
8 changes: 6 additions & 2 deletions lib/widget/date_picker_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,9 @@ class _DatePickerWidgetState extends State<DatePickerWidget> {
),
Positioned(
child: Container(
margin: const EdgeInsets.only(top: 63),
margin: EdgeInsets.only(
top: (widget.pickerTheme!.pickerHeight / 2) -
(widget.pickerTheme!.itemHeight / 2)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand All @@ -244,7 +246,9 @@ class _DatePickerWidgetState extends State<DatePickerWidget> {
),
Positioned(
child: Container(
margin: const EdgeInsets.only(top: 99),
margin: EdgeInsets.only(
top: (widget.pickerTheme!.pickerHeight / 2) +
(widget.pickerTheme!.itemHeight / 2)),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expand Down
8 changes: 4 additions & 4 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_holo_date_picker
description: A Flutter package of Datepicker that looks like Holo Theme in Android.
version: 1.0.6
homepage: https://github.com/kfiross/flutter_holo_date_picker
name: flutter_holo_date_picker_widget
description: A Clone of Flutter Holo Date Picker. A Flutter package of Datepicker inspired by the Holo Theme in Android.
version: 1.1.2
homepage: https://github.com/danoetz/flutter_holo_date_picker_widget

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down