我们如何在Flutter for web中显示吐司或小吃店?

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

我们如何在网络上的颤动中显示烤面包或小吃店?我尝试了许多第三方库,但无法实现。

提前感谢

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

现在是的,我们可以进行敬酒,但有一些限制。刚刚尝试过简单的toast libraryoktoast。最后一个仅适用于使用showToastWidget方法。


0
投票

使用okToast package,使用此程序包,您只需要用OKToast包装应用程序或父窗口小部件,然后调用showToast这样的方法:

OKToast(
          child: Scaffold(
            body: Center(
           child: Container(
               color:Colors.white;
             child: RaisedButton(
               elevation: 20.0,
                  color:  Color(0xFFEE507A),

                child: Text("Show Toast"),
                onPressed: () { 
                             setState(() {
                       showToast(
                       " Toast has been succefully showing!! ",
                       position: ToastPosition.bottom,
                       backgroundColor: Color(0xFFEE507A),
                       radius: 13.0,
                      textStyle: TextStyle(fontSize: 18.0,color:Colors.white),
                       animationBuilder: Miui10AnimBuilder(),);
                             });


                }),
           ),
      )
    ),
  );
© www.soinside.com 2019 - 2024. All rights reserved.