Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.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
Flutter 颤振:在浏览器中运行Web版本时如何停止显示移动应用程序_Flutter_Flutter Layout_Flutter Web - Fatal编程技术网

Flutter 颤振:在浏览器中运行Web版本时如何停止显示移动应用程序

Flutter 颤振:在浏览器中运行Web版本时如何停止显示移动应用程序,flutter,flutter-layout,flutter-web,Flutter,Flutter Layout,Flutter Web,我正在移动和Web平台上使用颤振构建一个应用程序。从Web到手机,我有几个不同的UI要显示。在chrome上运行的Web版本中,当我更改浏览器的大小时,它会显示移动应用程序页面 如何停止此操作,以便在更改浏览器布局时,Web版本不应显示移动版本。我假设您检查布局的大小,如: if (layoutSize <= someValue) { switchToSmallerLayout(); } if(layoutSize Platform.isIOS | | Platform.isAndr

我正在移动和Web平台上使用颤振构建一个应用程序。从Web到手机,我有几个不同的UI要显示。在chrome上运行的Web版本中,当我更改浏览器的大小时,它会显示移动应用程序页面


如何停止此操作,以便在更改浏览器布局时,Web版本不应显示移动版本。

我假设您检查布局的大小,如:

if (layoutSize <= someValue) {
  switchToSmallerLayout();
}
if(layoutSize Platform.isIOS | | Platform.isAndroid;
if(布局大小)
bool get _isMobile => Platform.isIOS || Platform.isAndroid;

if (layoutSize <= someValue && !_isMobile) {
  switchToSmallerLayout();
}