# flutter_toast **Repository Path**: daydayfull/flutter_toast ## Basic Information - **Project Name**: flutter_toast - **Description**: 一个类似安卓Toast的消息提示框 - **Primary Language**: Dart - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 4 - **Forks**: 0 - **Created**: 2019-06-13 - **Last Updated**: 2021-05-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # flutter_toast #### 介绍 一个类似安卓Toast的消息提示框 ![输入图片说明](https://images.gitee.com/uploads/images/2019/0620/085610_0af5a25b_2054946.gif "123.gif") #### 使用说明 1. 引用toast.dart ~~~ import 'package:test_app/toast.dart'; ~~~ 2. 简单调用方法 ~~~ RaisedButton( child: Text('点击打开Toast'), onPressed: (){ Toast.toast( context, msg: '大哥~你不是点到了我吗~', ); }) ~~~ 3. 提供参数 ~~~ Toast.toast( context, msg: '大哥~你不是点到了我吗~', // String 提示的文本 showTime: 2000, // int 显示的时间,单位milliseconds,也就是毫秒 bgColor: Color.fromRGBO(130, 0, 0, 1), // Color 提示框背景颜色 textColor: Color.fromRGBO(250, 100, 100, 1), // Color 提示框文字颜色 textSize: 18.0, // double 提示框文字大小 position: 'bottom', // String 提示框显示位置,默认是center,可设置top和bottom pdHorizontal: 50.0, // double 左右边距 pdVertical: 30.0, // double 上下边距 ) ~~~