Commit faabfc4d by Karthik Ponnam

Static Fluttertoast patch

parent d99334a4
...@@ -66,7 +66,7 @@ packages: ...@@ -66,7 +66,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "6.0.0" version: "6.0.1"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
......
...@@ -6,6 +6,31 @@ enum Toast { LENGTH_SHORT, LENGTH_LONG } ...@@ -6,6 +6,31 @@ enum Toast { LENGTH_SHORT, LENGTH_LONG }
enum ToastGravity { TOP, BOTTOM, CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_LEFT, CENTER_RIGHT } enum ToastGravity { TOP, BOTTOM, CENTER, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT, CENTER_LEFT, CENTER_RIGHT }
@Deprecated("Will be removed in further release")
class Fluttertoast {
@Deprecated("Will be removed in further release")
static void showToast(BuildContext context, {ToastGravity gravity = ToastGravity.BOTTOM, String msg, int toastDuration = 3}) {
FlutterToast flutterToast = FlutterToast(context);
Widget toast = Container(
padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25.0),
color: Color.fromRGBO(61, 61, 61, .7),
),
child: Text(
msg,
style: TextStyle(color: Colors.white),
),
);
flutterToast.showToast(
child: toast,
gravity: gravity,
toastDuration: Duration(seconds: toastDuration),
);
}
}
class FlutterToast { class FlutterToast {
BuildContext context; BuildContext context;
......
name: fluttertoast name: fluttertoast
description: Toast Library for Flutter, Easily create toast messages in single line of code description: Toast Library for Flutter, Easily create toast messages in single line of code
version: 6.0.0 version: 6.0.1
homepage: https://github.com/PonnamKarthik/FlutterToast homepage: https://github.com/PonnamKarthik/FlutterToast
issue_tracker: https://github.com/ponnamkarthik/FlutterToast/issues issue_tracker: https://github.com/ponnamkarthik/FlutterToast/issues
......
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