oktoast插件的使用
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return OKToast(
textStyle: TextStyle(fontSize: 16, color: Colors.white),
backgroundColor: Colors.black,
child: MaterialApp(
theme: new ThemeData(
primaryColor: Color.fromRGBO(236, 237, 236, 1),
),
home: Scaffold(
body: LoginPage(),
),
),
);
}
}
具体使用
showToast('哈哈哈', position: ToastPosition.bottom);