| | |
| | | import 'package:flutter/material.dart'; |
| | | import 'package:flutter/physics.dart'; |
| | | import 'package:flutter/services.dart'; |
| | | import 'package:makemoney/utils/ui_constant.dart'; |
| | | import 'package:pull_to_refresh/pull_to_refresh.dart'; |
| | | import 'package:fluttertoast/fluttertoast.dart'; |
| | | |
| | |
| | | |
| | | class ToastUtil { |
| | | static toast(String text, BuildContext context) { |
| | | // Toast.show(text, context); |
| | | // showToast(text,position: ToastPosition.bottom); |
| | | print("toast:$text"); |
| | | // uiMethodChannel.invokeMethod("toast", text); |
| | | Fluttertoast.showToast(msg: text, toastLength: Toast.LENGTH_SHORT); |
| | | if (Constant.NATIVE) { |
| | | uiMethodChannel.invokeMethod("toast", text); |
| | | } else { |
| | | Fluttertoast.showToast(msg: text, toastLength: Toast.LENGTH_SHORT); |
| | | } |
| | | } |
| | | } |
| | | |