Browse Source

Replaced material button with CupertinoButton

Kevin 6 years ago
parent
commit
407b1e322d
1 changed files with 9 additions and 2 deletions
  1. 9 2
      lib/flutter_datetime_picker.dart

+ 9 - 2
lib/flutter_datetime_picker.dart

@@ -385,6 +385,9 @@ class _DatePickerState extends State<_DatePickerComponent> {
     String done = _localeDone();
     String cancel = _localeCancel();
 
+    var _cancelDown = false;
+    var _doneDown = false;
+    
     return Container(
       height: theme.titleHeight,
       decoration: BoxDecoration(color: theme.backgroundColor ?? Colors.white),
@@ -393,7 +396,9 @@ class _DatePickerState extends State<_DatePickerComponent> {
         children: <Widget>[
           Container(
             height: theme.titleHeight,
-            child: FlatButton(
+            child: CupertinoButton(
+              pressedOpacity: 0.3,
+              padding: EdgeInsets.only(left: 16, top: 0),
               child: Text(
                 '$cancel',
                 style: theme.cancelStyle,
@@ -403,7 +408,9 @@ class _DatePickerState extends State<_DatePickerComponent> {
           ),
           Container(
             height: theme.titleHeight,
-            child: FlatButton(
+            child: CupertinoButton(
+              pressedOpacity: 0.3,
+              padding: EdgeInsets.only(right: 16, top: 0),
               child: Text(
                 '$done',
                 style: theme.doneStyle,