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

Suggestions not displaying on release apk but on debug mode #38

Closed
franciscogonzalez08 opened this issue Jun 28, 2022 · 11 comments
Closed
Labels
bug Something isn't working flutter This is a bug in flutter and we will need to wait for flutter team to fix it. waiting for author waiting for author to respond back with more info

Comments

@franciscogonzalez08
Copy link

franciscogonzalez08 commented Jun 28, 2022

Describe the bug
The bug is suggestions are not displaying on release mode but on debug mode they do.

To Reproduce

  1. Build apk with "flutter build apk"
  2. Install "app-release.apk" on phone and open it. You will see that searchField called "Tipo de cirugía" won't open suggestions.
    Expected behavior
    I expect that when clicking the searchField, siggestions are displayed.

Actual behavior
Suggestions are not showing up.

Screenshots

Debug Release
image image

Code sample

Padding(
  padding: EdgeInsets.symmetric(vertical: 4.0),
  child: SearchField(
    validator: (value) {
      if (value == null || value.isEmpty) {
        return 'Ingrese el tipo de cirugía';
      }
      return null;
    },
    controller: surgeryController,
    onSuggestionTap: (value) {
      setState(() {
        FocusScope.of(context).unfocus(); // Hide keyboard
      });
    },
    searchInputDecoration: InputDecoration(
        prefixIcon: Icon(MdiIcons.clipboardPulse),
        suffixIcon: IconButton(
          onPressed: () {
            setState(() {
              surgeryController.clear();
            });
          },
          icon: Icon(MdiIcons.closeThick),
        ),
        border: OutlineInputBorder(),
        labelText: 'Tipo de cirugía'),
    suggestions: [
      'Sustitución de válvula aórtica',
      'Revascularización',
      'Comunicación interventrucular',
      'Comunicación interauricular',
      'Sustitución de válvula mitral',
      'Marcapasos'
    ]
        .map((e) => SearchFieldListItem(e, child: Text(e)))
        .toList(),
  ),
),
@maheshj01 maheshj01 added the in triage Issue is currently being triaged label Jun 29, 2022
@maheshj01
Copy link
Owner

Hi @franciscogonzalez08m, Thanks for filing the issue. Could you please share what version of the plugin are you using?

@maheshj01 maheshj01 added the waiting for author waiting for author to respond back with more info label Jun 29, 2022
@maheshj01
Copy link
Owner

Nevermind I was able to reproduce the issue with the latest release searchfield: ^0.6.6

@maheshj01 maheshj01 added bug Something isn't working and removed waiting for author waiting for author to respond back with more info in triage Issue is currently being triaged labels Jun 29, 2022
@maheshj01
Copy link
Owner

I just found that this is a bug in a flutter, I will report it there soon. As a temporary fix please add hasOverlay: false in your existing code until this is resolved.

@maheshj01 maheshj01 added the flutter This is a bug in flutter and we will need to wait for flutter team to fix it. label Jun 29, 2022
@maheshj01 maheshj01 changed the title Suggestions not displaying on realease apk but on debug mode Suggestions not displaying on release apk but on debug mode Jun 29, 2022
@maheshj01
Copy link
Owner

I have filed the issue here flutter/flutter#106797

@franciscogonzalez08
Copy link
Author

Thank you so much man!

@agakshay304
Copy link

@franciscogonzalez08 Have you found the solution for the above error?

@maheshj01
Copy link
Owner

@agakshay304 #38 (comment)

As a temporary fix please add hasOverlay: false in your existing code until this is resolved.

@agakshay304
Copy link

Its not solving the issue. Actually my code is working fine in ios simulator but it keeps on refreshing in android emulator without showing any error.

@maheshj01
Copy link
Owner

@agakshay304 Can you please file a separate issue with more details and the code sample?

@maheshj01 maheshj01 added the review the issue needs to be reviewed again label Nov 21, 2023
@maheshj01
Copy link
Owner

maheshj01 commented Nov 23, 2023

I verified this issue on the stable 3.10.6, the suggestions are visible in release mode tested on Android Google pixel 7.

[✓] Flutter (Channel stable, 3.10.6, on macOS 13.6 22G120 darwin-arm64, locale en-IN)
    • Flutter version 3.10.6 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision f468f3366c (4 months ago), 2023-07-12 15:19:05 -0700
    • Engine revision cdbeda788a
    • Dart version 3.0.6
    • DevTools version 2.23.1

If anyone is still encountering this issue, Please free to leave a comment and I would love to take a look.

cc: @franciscogonzalez08 @agakshay304

@maheshj01 maheshj01 added waiting for author waiting for author to respond back with more info and removed review the issue needs to be reviewed again labels Nov 23, 2023
@maheshj01
Copy link
Owner

Since there has been no activity on this issue, I am assuming this is no longer reproducible. Closing as fixed.
In case you encounter this issue again please feel free to write in the comments or file a new issue with reproducible steps and I would love to take a look.

cc: @franciscogonzalez08 @agakshay304

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flutter This is a bug in flutter and we will need to wait for flutter team to fix it. waiting for author waiting for author to respond back with more info
Projects
None yet
Development

No branches or pull requests

3 participants