flutter-form-builder-ecosystem / flutter_form_builder

Simple form maker for Flutter Framework
https://pub.dev/packages/flutter_form_builder
MIT License
1.45k stars 526 forks source link

[FormBuilderDatePicker]: keyboardType is not passed to material showDatePicker #1351

Closed Brunobnahorny closed 5 months ago

Brunobnahorny commented 5 months ago

Is there an existing issue for this?

Package/Plugin version

7.7.0

Platforms

Flutter doctor

Flutter doctor ```bash Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.5, on Microsoft Windows [versÆo 10.0.22621.3007], locale pt-BR) [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc4) [✓] Chrome - develop for the web [✓] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.10) [✓] Android Studio (version 2022.2) [✓] VS Code (version unknown) ✗ Unable to determine VS Code version. [✓] VS Code, 32-bit edition (version unknown) ✗ Unable to determine VS Code version. [✓] VS Code, 64-bit edition (version 1.85.1) [✓] Connected device (4 available) [✓] Network resources • No issues found! ```

Minimal code example

Code sample ```dart final widget = FormBuilderDateTimePicker( keyboardType: TextInputType.text, inputType: InputType.text, ); ```

Current Behavior

The keyboardType parameter is not passed to material showDatePicker call.

Expected Behavior

The keyboardType parameter should be respected inside the picker.

Steps To Reproduce

run example with this date picker.

FormBuilderDateTimePicker(
        keyboardType: TextInputType.text,
        inputType: InputType.date,
      );

Aditional information

No response

Brunobnahorny commented 5 months ago

The proposed change could affect existing package users, since the default value for keyboardType is TextInputType.text;

I think the removal of the default value should prevent any breaking changes for those who did not set a value.