Commit c3565732 by Karthik

changes

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