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

[version-4.3.3] value not exists in SmartSelect<String>.single function #114

Open
RebaekSoparkKitchen opened this issue Dec 5, 2023 · 0 comments

Comments

@RebaekSoparkKitchen
Copy link

Hi,

I am happy to see this package has been upgraded to 4.3.3 which is a null-safety version. However, after changes, I have checked that the function SmartSelect<String>.single in previous version can take parameter value, which in new version is not supported.

Also, in onChange function, state.valueDisplay is not supported.
example:

SmartSelect<String>.single(
      title: '业务经理',
      value: controller.contact.value,
      choiceItems: controller.staffOptions,
      modalType: S2ModalType.bottomSheet,
      modalConfig: S2ModalConfig(
        );
      },
      onChange: (state) {
        if (state.value != '' && state.valueDisplay != '') {
          controller.contactController.text = state.valueDisplay;
        print('state: $state');
        if (state.value != '') {
          controller.contactController.text = state.value;
        }
        controller.contactId.value = int.tryParse(state.value);
  }),

My example code work well in 4.3.2 version, is there anyone has any idea that how to migrate such code to 4.3.3 version? Thanks very much!

My env is as below:

Flutter 3.0.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision cd41fdd495 (1 year, 6 months ago) • 2022-06-08 09:52:13 -0700
Engine • revision f15f824b57
Tools • Dart 2.17.3 • DevTools 2.12.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant