admin
2022-05-07 4c7cde7ae5ed57335405459e47de4bbd2726c4ba
flutter_module/lib/utils/ui_utils.dart
@@ -2,6 +2,7 @@
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';
@@ -81,11 +82,11 @@
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);
    }
  }
}