belovance / QuickAlert

An instantly ready, full-featured alerts for development on any platform with flutter. Enabling you to complete projects and deploy quickly. With QuickAlert, you can display animated alert dialogs such as success, error, warning, confirm, loading or even a custom dialog.
https://pub.dev/packages/quickalert
MIT License
46 stars 42 forks source link

tap OK button make a blank screen after AutoClose elapsed time #18

Closed LuisCarrizo closed 1 year ago

LuisCarrizo commented 1 year ago

Describe the bug In flutter, when user tap Quick Alert´s OK button, the quickAlert dialog is closed, but after the time specified in the autoCloseDuration property, the screen became black.

To test the bug I wrote a very simple project based on counter project.

pubspec.yaml looks like this:

name: debug01
description: A new Flutter project.
publish_to: 'none' 
version: 1.0.0+1

environment:
  sdk: '>=3.1.0-128.0.dev <4.0.0'

dependencies:
  flutter:
    sdk: flutter
  quickalert: ^1.0.1
  cupertino_icons: ^1.0.2

dev_dependencies:
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true

I´ve added a sucess quickAlert after _counter++; on _incrementCounter() method, with 5 seconds autoCloseDuration

  void _incrementCounter() {
    setState(() {
      _counter++;
      // quick alert added for debug
      QuickAlert.show(
        context: context,
        type: QuickAlertType.success,
        text: 'Transaction Completed Successfully!',
        autoCloseDuration: const Duration(seconds: 5),
      );
    });
  }

The problem is that when user tap Quick Alert´s OK button, the quickAlert dialog is closed, but after the time specified in the autoCloseDuration property, the screen became black. No debug console message was shown. Tested on:

To Reproduce Steps to reproduce the behavior:

  1. set autoCloseDuration property of a quickAlert dialog with n seconds
  2. show the quickAlert dialog
  3. click OK button
  4. Screen became black after n seconds

Expected behavior OK button should close the quickAlert Dialog and interrupt autoClose

Desktop ():

**Android emulator

Smartphone :

Screenshots video attached

https://github.com/belovance/QuickAlert/assets/33325595/ecaea8f7-c9cb-4288-a44e-241c8daa66bd