Flutter:禁用平板电脑和iPad的应用程序

rlcwz9us  于 2023-03-04  发布在  Flutter
关注(0)|答案(2)|浏览(180)

我正在flutter上开发一个应用程序,我想在android和ios上禁用这个应用程序。

ruoxqz4g

ruoxqz4g1#

对于android,在manifest标签之间包含这些屏幕密度以支持屏幕。

<compatible-screens>
    <!-- all small size screens -->
    <screen android:screenSize="small" android:screenDensity="ldpi" />
    <screen android:screenSize="small" android:screenDensity="mdpi" />
    <screen android:screenSize="small" android:screenDensity="hdpi" />
    <screen android:screenSize="small" android:screenDensity="xhdpi" />
    <screen android:screenSize="small" android:screenDensity="xxhdpi" />
    <screen android:screenSize="small" android:screenDensity="xxxhdpi" />
    <!-- all normal size screens -->
    <screen android:screenSize="normal" android:screenDensity="ldpi" />
    <screen android:screenSize="normal" android:screenDensity="mdpi" />
    <screen android:screenSize="normal" android:screenDensity="hdpi" />
    <screen android:screenSize="normal" android:screenDensity="xhdpi" />
    <screen android:screenSize="normal" android:screenDensity="xxhdpi" />
    <screen android:screenSize="normal" android:screenDensity="xxxhdpi" />
 </compatible-screens>

对于iOS,从Runner中打开常规设置,并在部署信息下取消选中iPad支持。

nkkqxpd9

nkkqxpd92#

对于iOS,Runner设置的常规选项卡中有受支持的目标标题

相关问题