feat(platform): 添加桌面端平台能力降级适配
- 新增 PlatformCapabilities 平台能力判断类,统一检测移动端原生插件可用性 - 地图、定位、扫码、相册、拨号、通话录制等入口在桌面端降级为提示 - 系统 UI 配置与 moveTaskToBack 在桌面端跳过,避免插件异常 - 设备信息工具新增 Windows 平台支持,返回 computerName - 百度地图 SDK 初始化增加平台判断,桌面端不再调用 - 新增个人资料编辑页面及路由,从「我的」页头部入口跳转 - 国际化添加 featureUnsupported 提示文案
This commit is contained in:
1 parent
5947fa1f53
commit
5f84a64c3e
18 files changed
+342
-73
No files matched your search
@@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:permission_handler/permission_handler.dart';
|
||||
|
||||
import '../../../app/constants/app_constants.dart';
|
||||
import '../../../core/platform/platform_capabilities.dart';
|
||||
|
||||
/// 家属端手机本机定位结果。
|
||||
///
|
||||
@@ -100,6 +101,9 @@ class LocationController extends Notifier<LocationState> {
|
||||
if (_started) return;
|
||||
_started = true;
|
||||
|
||||
// 百度定位插件仅支持 Android / iOS,桌面端不初始化(地图入口已降级为提示)。
|
||||
if (!PlatformCapabilities.baiduLocation) return;
|
||||
|
||||
// 1. 请求运行时定位权限。
|
||||
final granted = await _ensureLocationPermission();
|
||||
if (!granted) {
|
||||
|
||||
Reference in new issue
Block a user