Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在IOS上在键盘上方显示烤面包片_Android_Ios_Flutter_Toast - Fatal编程技术网

Android 在IOS上在键盘上方显示烤面包片

Android 在IOS上在键盘上方显示烤面包片,android,ios,flutter,toast,Android,Ios,Flutter,Toast,我正在使用toast 7.0.4软件包在我的应用程序中显示toast,但在IOS上,当键盘打开时,toast不会显示“它实际上出现在键盘后面”这是我的代码 Fluttertoast.showToast( msg: message, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 1, backgr

我正在使用toast 7.0.4软件包在我的应用程序中显示toast,但在IOS上,当键盘打开时,toast不会显示“它实际上出现在键盘后面”这是我的代码

  Fluttertoast.showToast(
        msg: message,
        toastLength: Toast.LENGTH_SHORT,
        gravity: ToastGravity.BOTTOM,
        timeInSecForIosWeb: 1,
        backgroundColor: AppColors.strongOrange,
        textColor: Colors.white,
        fontSize: 16.0
);

是否有任何方法可以更改z索引并使其在Flatter中大于键盘的z索引

在ios中无法在键盘上方显示FlatterToast

有两种选择:

1.将吐司的重心改为中心

   Fluttertoast.showToast(
          msg: message,
          toastLength: Toast.LENGTH_SHORT,
          gravity: ToastGravity.CENTER,
          backgroundColor: Colors.red,
          textColor: Colors.white,
          fontSize: 16.0
      );
  • 在底部显示烤面包时隐藏键盘

           FocusManager.instance.primaryFocus.unfocus();