用户登录后如何显示小吃店或吐司

问题描述 投票:0回答:2

当用户登录['you have successfully logged in!']时,如何显示小吃店或吐司,或者可能是导航后如何显示小吃店或吐司。

flutter dart flutter-layout
2个回答
0
投票

您可以这样显示它:

final snackBar = SnackBar(content: Text('you have successfully logged in!'));
Scaffold.of(context).showSnackBar(snackBar);

这里是official documentation


0
投票

我建议您使用Flushbar插件:https://pub.dev/packages/flushbar您可以使用

来调用它
Flushbar(
    title:  "You have successfully logged in!",
    duration:  Duration(seconds: 3),)..show(context)
© www.soinside.com 2019 - 2024. All rights reserved.