toastx 0.0.2

Flutter Android iOS web

A Toast Plus of Flutter.

toastx #

A Toast Plus of Flutter.

安装 #

  1. 在 pubspec.yaml 中添加
dependencies:
  toastx: ^0.0.1
  1. 执行命令
  flutter packages get
  1. 导入
import 'package:toastx/toastx.dart';

使用 #

# 顶部显示
Toastx.show(context, '顶部', location: ToastxLocation.TOP);

# 中部显示
Toastx.show(context, '中部', location: ToastxLocation.CENTER);

# 短时间显示
Toastx.show(context, '底部2s', duration: ToastxDuration.SHORT);

# 中等时间显示
Toastx.show(context, '底部5s', duration: ToastxDuration.MIDDLE);

# 长时间显示
Toastx.show(context, '底部10s', duration: ToastxDuration.LONG);

# 自定义显示背景
Toastx.show(context, '红色背景', color: Colors.red);

# 自定义显示字体风格
Toastx.show(context, '字体', style: TextStyle(fontSize: 30);
0
likes
100
pub points
0%
popularity

A Toast Plus of Flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

mazaiting@gmail.com

License

Apache 2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on toastx