Browse Source

视频详情空安全更改;

定位异常解决;
门店列表溢出处理;
获取ip接口异常处理;
dart3
wurong 5 months ago
parent
commit
c61f811856
  1. 1
      devtools_options.yaml
  2. 2
      lib/community/community_view/class_details_video.dart
  3. 1
      lib/retrofit/retrofit_api.dart
  4. 2
      lib/retrofit/retrofit_api.g.dart
  5. 2
      lib/union/union_list.dart
  6. 6
      lib/utils/location.dart
  7. 16
      pubspec.lock
  8. 2
      pubspec.yaml

1
devtools_options.yaml

@ -0,0 +1 @@
extensions:

2
lib/community/community_view/class_details_video.dart

@ -63,7 +63,7 @@ class ClassDetailsVideoState extends State<ClassDetailsVideo> {
videoPlayerController?.pause(); videoPlayerController?.pause();
videoPlayerController?.dispose(); videoPlayerController?.dispose();
videoPlayerController = VideoPlayerController.networkUrl( videoPlayerController = VideoPlayerController.networkUrl(
Uri.parse(videoUrl), Uri.parse(videoUrl ?? ""),
)..initialize().then((value) { )..initialize().then((value) {
chewieAudioController = ChewieController( chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController!, videoPlayerController: videoPlayerController!,

1
lib/retrofit/retrofit_api.dart

@ -2,6 +2,7 @@ import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:fast_gbk/fast_gbk.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

2
lib/retrofit/retrofit_api.g.dart

@ -2802,7 +2802,7 @@ class _ApiService implements ApiService {
_dio.options.baseUrl, _dio.options.baseUrl,
baseUrl, baseUrl,
)))); ))));
String result = _result.data! as String; var result = gbk.decode(_result.data as List<int>);
print("result: ${result}"); print("result: ${result}");
final value = IpData.fromJson(jsonDecode(result.substring(result.indexOf("{\"ip\":\"")).replaceAll(");}", ""))); final value = IpData.fromJson(jsonDecode(result.substring(result.indexOf("{\"ip\":\"")).replaceAll(");}", "")));
return value; return value;

2
lib/union/union_list.dart

@ -353,7 +353,7 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
), ),
SizedBox(height: store.businessService == "" ? 40.h : 23.h), SizedBox(height: store.businessService == "" ? 40.h : 23.h),
Container( Container(
height: 100.h, height: 105.h,
child: ListView.builder( child: ListView.builder(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
itemCount: itemCount:

6
lib/utils/location.dart

@ -47,7 +47,11 @@ class LocationInstance {
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
}); });
Position locationData = await Geolocator.getCurrentPosition(); Position locationData = await Geolocator.getCurrentPosition(
desiredAccuracy: LocationAccuracy.medium,
timeLimit: const Duration(seconds: 30),
forceAndroidLocationManager: true,
);
isNext = false; isNext = false;
locationCallback.call(locationData); locationCallback.call(locationData);
} }

16
pubspec.lock

@ -321,6 +321,14 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.3.1" 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: ffi:
dependency: transitive dependency: transitive
description: description:
@ -374,14 +382,6 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.0.5" 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: flutter_html:
dependency: "direct main" dependency: "direct main"
description: description:

2
pubspec.yaml

@ -72,7 +72,7 @@ dependencies:
flutter_screenutil: 5.9.0 flutter_screenutil: 5.9.0
bubble_tab_indicator: ^0.1.6 bubble_tab_indicator: ^0.1.6
flutter_gbk2utf8: ^1.0.0 fast_gbk: ^1.0.0
visibility_detector: ^0.4.0+2 visibility_detector: ^0.4.0+2

Loading…
Cancel
Save