From 71c1539c7887c2b8df2eab0fe5f242764a284eea Mon Sep 17 00:00:00 2001 From: Joons Date: Fri, 14 Oct 2022 16:20:04 +0200 Subject: [PATCH 1/2] add icon as argument --- .../input/input_types/input_date_picker/date_picker.dart | 2 +- .../input/input_types/input_date_picker/input_date_picker.dart | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart b/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart index cd5c5bc..a743e10 100644 --- a/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart +++ b/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart @@ -15,7 +15,7 @@ class DateTimeInputField extends ConsumerStatefulWidget { required this.controller, this.label, this.showIcon = true, - this.icon = Icons.calendar_today, + required this.icon, required this.dateFormat, required this.firstDate, required this.lastDate, diff --git a/lib/src/widgets/input/input_types/input_date_picker/input_date_picker.dart b/lib/src/widgets/input/input_types/input_date_picker/input_date_picker.dart index 5e7d7f8..83637d7 100644 --- a/lib/src/widgets/input/input_types/input_date_picker/input_date_picker.dart +++ b/lib/src/widgets/input/input_types/input_date_picker/input_date_picker.dart @@ -52,6 +52,7 @@ class FlutterFormInputDateTime extends FlutterFormInputWidget { return DateTimeInputField( label: label, + icon: icon, firstDate: firstDate, lastDate: lastDate, inputType: inputType, From f82d5ac7b23b05c5390b3a2f5b1c94176e783d22 Mon Sep 17 00:00:00 2001 From: Joons Date: Wed, 19 Oct 2022 09:24:37 +0200 Subject: [PATCH 2/2] add scollpadding --- CHANGELOG.md | 4 ++++ .../input/input_types/input_date_picker/date_picker.dart | 4 ++-- lib/src/widgets/input/input_types/input_plain_text.dart | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1caa569..9c29a36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,3 +21,7 @@ ## 1.0.1 - October 13th 2022 - Added forgotten onChanged parameter on date input field + +## 1.0.2 - October 13th 2022 + +- Added forgotten icon parameter on date input field and scrollpadding on text inputfield \ No newline at end of file diff --git a/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart b/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart index a743e10..4b9b3a4 100644 --- a/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart +++ b/lib/src/widgets/input/input_types/input_date_picker/date_picker.dart @@ -15,7 +15,7 @@ class DateTimeInputField extends ConsumerStatefulWidget { required this.controller, this.label, this.showIcon = true, - required this.icon, + this.icon, required this.dateFormat, required this.firstDate, required this.lastDate, @@ -32,7 +32,7 @@ class DateTimeInputField extends ConsumerStatefulWidget { final DateTime? lastDate; final DateTime? initialDate; final DateTimeRange? initialDateTimeRange; - final IconData icon; + final IconData? icon; final Widget? label; @override ConsumerState createState() => _DateInputFieldState(); diff --git a/lib/src/widgets/input/input_types/input_plain_text.dart b/lib/src/widgets/input/input_types/input_plain_text.dart index be0b887..bc864c7 100644 --- a/lib/src/widgets/input/input_types/input_plain_text.dart +++ b/lib/src/widgets/input/input_types/input_plain_text.dart @@ -16,6 +16,7 @@ class FlutterFormInputPlainText extends FlutterFormInputWidget { this.textAlignVertical, this.expands = false, this.maxLines, + this.scrollPadding, this.maxLength, }) : super(key: key, controller: controller, label: label); @@ -24,6 +25,7 @@ class FlutterFormInputPlainText extends FlutterFormInputWidget { final bool expands; final int? maxLines; final int? maxLength; + final EdgeInsets? scrollPadding; @override Widget build(BuildContext context, WidgetRef ref) { @@ -38,6 +40,7 @@ class FlutterFormInputPlainText extends FlutterFormInputWidget { ); return TextFormField( + scrollPadding: scrollPadding ?? const EdgeInsets.all(20.0), initialValue: controller.value, onSaved: (value) => controller.onSaved(value), validator: (value) => controller.onValidate(value, _),