我正在尝试检查用户使用的是Iphone还是Android我正在关注这个帖子以查看HowdoyoudetectthehostplatformfromDartcode?在我的initState中,我添加了以下检查typeOfDevice=Theme.of(context).platform==TargetPlatform.iOS?"1":"2";但每当我尝试使用它时,我都会收到以下错误I/flutter(22330):══╡EXCEPTIONCAUGHTBYWIDGETSLIBRARY╞════════════════════════════════════════════════════
我正在尝试检查用户使用的是Iphone还是Android我正在关注这个帖子以查看HowdoyoudetectthehostplatformfromDartcode?在我的initState中,我添加了以下检查typeOfDevice=Theme.of(context).platform==TargetPlatform.iOS?"1":"2";但每当我尝试使用它时,我都会收到以下错误I/flutter(22330):══╡EXCEPTIONCAUGHTBYWIDGETSLIBRARY╞════════════════════════════════════════════════════
这是我的第一个flutter应用程序,由于某种原因,Android启动器图标停止显示,所以我试图修复它,我做了很多事情并最终出现了这个错误。flutter医生显示一切正常。ios版本构建得很好。p.s我运行了fluttercreate。没有运气。IDE日志NoapplicationfoundforTargetPlatform.android_x86.Isyourprojectmissinganandroid/app/src/main/AndroidManifest.xml?Considerrunning"fluttercreate."tocreateone.
这是我的第一个flutter应用程序,由于某种原因,Android启动器图标停止显示,所以我试图修复它,我做了很多事情并最终出现了这个错误。flutter医生显示一切正常。ios版本构建得很好。p.s我运行了fluttercreate。没有运气。IDE日志NoapplicationfoundforTargetPlatform.android_x86.Isyourprojectmissinganandroid/app/src/main/AndroidManifest.xml?Considerrunning"fluttercreate."tocreateone.
Flutter设置TargetPlatform.iOSnewMaterialApp(title:'Mian',theme:newThemeData(primarySwatch:Colors.orange,platform:TargetPlatform.iOS,))可以跳过关闭页面。Flutter设置TargetPlatform.androidnewMaterialApp(title:'Mian',theme:newThemeData(primarySwatch:Colors.orange,platform:TargetPlatform.android,))无法跳过关闭页面。