cmdrootaccess / another-flushbar

A flexible widget for user notification. Customize your text, button, duration, animations and much more. For Android devs, it is made to replace Snackbars and Toasts.
https://pub.dev/packages/another_flushbar
MIT License
146 stars 90 forks source link

AnotherFlushbar conflict AwesomeDialog #100

Closed JmyW closed 1 year ago

JmyW commented 1 year ago

Hi I found a compatibility issue between AnotherFlushbar and AwesomeDialog. https://pub.dev/packages/another_flushbar https://pub.dev/packages/awesome_dialog

In AwesomeDialog has a function "autoHide" which can auto dismiss the dialog after a duration. Whatever how long the duration, when I set it. If a Flushbar appear during the duration. The autoHide of AwesomeDialog won't work. And even worse, the dailog is not dismissible any more. The dialog is always there, cannot close.

It's easily reproduced and 100% happen. Could you check it?

cmdrootaccess commented 1 year ago

sure i will check

JmyW commented 1 year ago

Issue is still there. I'm sorry I have no time to wait. I have to use another package instead of this flushbar.

JmyW commented 1 year ago

But to be fair, it maybe not the issue on flushbar but mutual conflict between AwesomeDialog and AnotherFlushBar. I believe either one can fix it, just don't know whom can do so.

cmdrootaccess commented 1 year ago

But to be fair, it maybe not the issue on flushbar but mutual conflict between AwesomeDialog and AnotherFlushBar. I believe either one can fix it, just don't know whom can do so.

can you paste your code ? so i can test it

JmyW commented 1 year ago

I made a simple test code. Hope it help you. Press the button, the Dialog will show immediately then Flushbar will come out after 2 sec. The dialog can be closed before and after Flushbar appearance. But failed during Flushbar appearance and won't close any more.

===================pubspec.yaml==================== awesome_dialog: ^3.1.0 another_flushbar: ^1.12.30 ===================main.dart==================== import 'dart:async'; import 'package:another_flushbar/flushbar.dart'; import 'package:awesome_dialog/awesome_dialog.dart'; import 'package:flutter/material.dart';

void main() { runApp(MyApp()); }

class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: Text('AwesomeDialg & AnotherFlushBar'), ), body: HomePage(), )); } }

class HomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Center( child: TextButton( onPressed: () { AwesomeDialog( context: context, title: "Title", desc: "Description", btnOkText: "OK", btnOkOnPress: () {}, ).show();

      Timer(const Duration(milliseconds: 2000), () async {
        Flushbar(
          titleText: Text(
            "Title"
          ),
          messageText: Text(
            "Body"
          ),
          flushbarPosition: FlushbarPosition.TOP,
          borderColor: Colors.black,
          borderWidth: 2,
          borderRadius: BorderRadius.circular(10),
          backgroundColor: Colors.white,
        ).show(context);
      });
    },
    child: Text("BUTTON"),
  )
);

} }