Open thintime-X opened 2 hours ago
连续性的调用toast,会有持续显示不消失的情况
import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; void main() { runApp(MaterialApp( navigatorObservers: [FlutterSmartDialog.observer], builder: FlutterSmartDialog.init(), home: MyApp(), )); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: const Text( "Test", ), ), body: Center( child: ElevatedButton( onPressed: () { show("toast1"); show("toast2"); }, child: const Text( "Click", ), ), ), ); } Future show(String msg) { return SmartDialog.showToast( msg, alignment: Alignment.center, displayType: SmartToastType.last, displayTime: const Duration(seconds: 3), ); } }
目前是必现的情况。
版本信息
描述bug/需求
连续性的调用toast,会有持续显示不消失的情况
问题demo