diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 1c922f8..de7d397 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,3 +1,4 @@ { - "flutterSdkVersion": "stable" + "flutterSdkVersion": "2.0.2", + "flavors": {} } \ No newline at end of file diff --git a/android/build.gradle b/android/build.gradle index 8fc01c0..ccb95d3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,6 +4,9 @@ buildscript { repositories { google() jcenter() + maven { + url "https://mvn.mob.com/android" + } } dependencies { @@ -18,6 +21,10 @@ allprojects { repositories { google() jcenter() + maven { + url "https://mvn.mob.com/android" + } + } } diff --git a/lib/pages/home/classify/classify_page.dart b/lib/pages/home/classify/classify_page.dart index c63ebbc..b12614f 100644 --- a/lib/pages/home/classify/classify_page.dart +++ b/lib/pages/home/classify/classify_page.dart @@ -176,7 +176,7 @@ class _ClassifyPageState extends BaseStoreState if (currentIndex < widget.data.length - 1 && notification.metrics.pixels.toInt() > - notification.metrics.maxScrollExtent + 120) { + ( notification.metrics.maxScrollExtent + 120).toInt()) { if (!animating) { animating = true; currentIndex++; diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 2eccac3..b86e5fc 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -1421,9 +1421,17 @@ class _HomePageState extends BaseStoreState } Future requestPermission() async { - bool permission = await Permission.locationWhenInUse.isGranted; + if (Platform.isIOS) { + return true; + } + bool permission = await Permission.locationWhenInUse.isRestricted; + bool permanentDenied = + await Permission.locationWhenInUse.isPermanentlyDenied; if (!permission) { - await Permission.locationWhenInUse.request(); + await Permission.locationWhenInUse.request(); + if (permanentDenied) { + await PermissionTool.showOpenPermissionDialog(context, '打开定位权限'); + } permission = await Permission.locationWhenInUse.isGranted; } return permission;