-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
版本信息
- Flutter版本:[v3.19.6]
- flutter_smart_dialog版本:[v4.9.8+3]
描述bug/需求
问题demo
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),
);
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
