Commit c3565732 by Karthik

changes

parent 00c74faa
## [2.2.7]
* FontSize Can be changed
* FlutterToast Implementation Changed to `FlutterToast.instance`
## [2.2.6]
* removed androidx
......
......@@ -13,7 +13,7 @@ If your project uses androidx then use `fluttertoast` version `2.2.4` or `2.2.5`
```yaml
# add this line to your dependencies
fluttertoast: ^2.2.6
fluttertoast: ^2.2.7
```
```dart
......@@ -21,13 +21,14 @@ import 'package:fluttertoast/fluttertoast.dart';
```
```dart
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Center Short Toast",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
timeInSecForIos: 1,
backgroundColor: Colors.red,
textColor: Colors.white
textColor: Colors.white,
fontSize: 16.0
);
```
......@@ -39,6 +40,7 @@ gravity | ToastGravity.TOP (or) ToastGravity.CENTER (or) ToastGravity.BOTTOM
timeInSecForIos | int (only for ios)
bgcolor | Colors.red
textcolor| Colors.white
fontSize | 16.0 (float)
## Preview Images
......
......@@ -15,14 +15,14 @@ class _MyAppState extends State<MyApp> {
}
void showLongToast() {
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Long Toast",
toastLength: Toast.LENGTH_LONG,
);
}
void showColoredToast() {
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Colored Toast",
toastLength: Toast.LENGTH_SHORT,
backgroundColor: Colors.red,
......@@ -30,14 +30,14 @@ class _MyAppState extends State<MyApp> {
}
void showShortToast() {
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Short Toast",
toastLength: Toast.LENGTH_SHORT,
timeInSecForIos: 1);
}
void showTopShortToast() {
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Top Short Toast",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.TOP,
......@@ -45,7 +45,7 @@ class _MyAppState extends State<MyApp> {
}
void showCenterShortToast() {
Fluttertoast.showToast(
Fluttertoast.instance.showToast(
msg: "This is Center Short Toast",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.CENTER,
......
name: fluttertoast
description: Toast Library for FLutter
version: 2.2.6
version: 2.2.7
author: Karthik Ponnam <ponnamkarthik3@gmail.com>
homepage: https://github.com/PonnamKarthik/FlutterToast
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment