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

4.9.7Adaptation problem #188

Closed
CmosLee opened this issue May 20, 2024 · 4 comments
Closed

4.9.7Adaptation problem #188

CmosLee opened this issue May 20, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@CmosLee
Copy link

CmosLee commented May 20, 2024

Version Information

  • Flutter version: [e.g. v3.19.5]
  • flutter_smart_dialog version: [e.g. v4.9.7]

Describe the bug/requirement

On a Huawei mobile phone, SmartDialog.dismiss() is invalid after SmartDialog.show() is run, and dialog is not closed
The same code and phone will work fine in v4.9.6+2 and earlier versions

Problem demo

 if (Platform.isAndroid) EolPermissionTip.show(tip);
    final PermissionStatus status = await permission.request();
    if (Platform.isAndroid) EolPermissionTip.hide();
@xdd666t
Copy link
Member

xdd666t commented May 20, 2024

The 4.9.7 version has reengineered the initialization logic, and there may indeed be some problems. Please provide a most simplified demo that can be run directly and reproduce the problem. I need to locate where the problem is.

@xdd666t xdd666t self-assigned this May 20, 2024
@CmosLee
Copy link
Author

CmosLee commented May 20, 2024

Closing the dialog for a short time after it is displayed is not valid, but versions prior to v4.9.6+2 are

void _showDialog() async {
    SmartDialog.show<void>(
        builder: (_) {
          Widget child = Container(
            height: 80,
            width: 180,
            decoration: BoxDecoration(
              color: Colors.black,
              borderRadius: BorderRadius.circular(10),
            ),
            alignment: Alignment.center,
            child: const Text(
              'easy custom dialog',
              style: TextStyle(color: Colors.white),
            ),
          );
          return SafeArea(child: child);
        },
        keepSingle: true,
        permanent: true);
//TODO
    _closeDialog();
  }

  void _closeDialog() {
    SmartDialog.dismiss<void>(force: true);
  }

@xdd666t xdd666t added the bug Something isn't working label May 21, 2024
xdd666t added a commit that referenced this issue May 21, 2024
@xdd666t
Copy link
Member

xdd666t commented May 21, 2024

  • try the new version
dependencies:
  flutter_smart_dialog: ^4.9.7+1

@CmosLee
Copy link
Author

CmosLee commented May 21, 2024

The issue has been fixed in v4.9.7+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants