Skip to content
Permalink
Browse files

bug: _dateFormatter and _timeFormatter in example had the wrong signa…

…ture
  • Loading branch information...
MikeMitterer committed Nov 22, 2018
1 parent 3f3a4b3 commit 26870b7f0501c7c8ea9eddb34c3a8087fe08c67f
Showing with 2 additions and 4 deletions.
  1. +2 −4 samples/m4d_form/lib/dialog/TimeFrameDialog.dart
@@ -90,8 +90,7 @@ class TimeFrameDialog extends MaterialDialog {
// - private ----------------------------------------------------------------------------------
MaterialFormComponent get _form => MaterialFormComponent.widget(query(".mdl-form"));

static String _dateFormatter(dynamic date, final baseValue) {
final format = "dd.MM.yyyy";
static String _dateFormatter(dynamic date, final baseValue,{final String format = "dd.MM.yyyy" }) {
if(date is String) {
try {
date = DateTime.parse(date);
@@ -102,8 +101,7 @@ class TimeFrameDialog extends MaterialDialog {
return date != null ? new DateFormat(format).format(date as DateTime) : (baseValue?.toString() ?? "");
}

static String _timeFormatter(dynamic date, final baseValue) {
final format = "HH:mm";
static String _timeFormatter(dynamic date, final baseValue,{final String format = "HH:mm" }) {
if(date is String) {
try {
date = DateTime.parse(date);

0 comments on commit 26870b7

Please sign in to comment.
You can’t perform that action at this time.