Closed JmyW closed 1 year ago
sure i will check
Issue is still there. I'm sorry I have no time to wait. I have to use another package instead of this flushbar.
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.
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
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"),
)
);
} }
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?