diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 00000000..7e7e7f67 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1 @@ +extensions: diff --git a/lib/community/community_view/class_details_video.dart b/lib/community/community_view/class_details_video.dart index 05c236db..17345b17 100644 --- a/lib/community/community_view/class_details_video.dart +++ b/lib/community/community_view/class_details_video.dart @@ -63,7 +63,7 @@ class ClassDetailsVideoState extends State { videoPlayerController?.pause(); videoPlayerController?.dispose(); videoPlayerController = VideoPlayerController.networkUrl( - Uri.parse(videoUrl), + Uri.parse(videoUrl ?? ""), )..initialize().then((value) { chewieAudioController = ChewieController( videoPlayerController: videoPlayerController!, diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 76aaba10..0e2057f6 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:dio/dio.dart'; +import 'package:fast_gbk/fast_gbk.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index a8c620d2..49b79a22 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2802,7 +2802,7 @@ class _ApiService implements ApiService { _dio.options.baseUrl, baseUrl, )))); - String result = _result.data! as String; + var result = gbk.decode(_result.data as List); print("result: ${result}"); final value = IpData.fromJson(jsonDecode(result.substring(result.indexOf("{\"ip\":\"")).replaceAll(");}", ""))); return value; diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index f0e0eec9..b8835fe8 100644 --- a/lib/union/union_list.dart +++ b/lib/union/union_list.dart @@ -353,7 +353,7 @@ class _UnionList extends State with AutomaticKeepAliveClientMixin { ), SizedBox(height: store.businessService == "" ? 40.h : 23.h), Container( - height: 100.h, + height: 105.h, child: ListView.builder( padding: EdgeInsets.zero, itemCount: diff --git a/lib/utils/location.dart b/lib/utils/location.dart index 54836046..ad970fac 100644 --- a/lib/utils/location.dart +++ b/lib/utils/location.dart @@ -47,7 +47,11 @@ class LocationInstance { EasyLoading.dismiss(); } }); - Position locationData = await Geolocator.getCurrentPosition(); + Position locationData = await Geolocator.getCurrentPosition( + desiredAccuracy: LocationAccuracy.medium, + timeLimit: const Duration(seconds: 30), + forceAndroidLocationManager: true, + ); isNext = false; locationCallback.call(locationData); } diff --git a/pubspec.lock b/pubspec.lock index bb3bffe9..42bc55e8 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -321,6 +321,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.3.1" + fast_gbk: + dependency: "direct main" + description: + name: fast_gbk + sha256: "3f0dc0309986f615404ea8d1fccf00a535dc00ee90b88d71492866bd95586489" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.0.0" ffi: dependency: transitive description: @@ -374,14 +382,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.0.5" - flutter_gbk2utf8: - dependency: "direct main" - description: - name: flutter_gbk2utf8 - sha256: c17323808d6ae7cfaf7676669e0130c33df6be322eb807cdd32face5824c1134 - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.0.1" flutter_html: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index a6a458d7..3e3fef0b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -72,7 +72,7 @@ dependencies: flutter_screenutil: 5.9.0 bubble_tab_indicator: ^0.1.6 - flutter_gbk2utf8: ^1.0.0 + fast_gbk: ^1.0.0 visibility_detector: ^0.4.0+2