Browse Source

safety

master
fmk 3 years ago
parent
commit
daf0d7a687
  1. 8
      lib/retrofit/retrofit_api.dart
  2. 4
      lib/union/union_details_page.dart
  3. 40
      lib/web/web_view/web_content.dart

8
lib/retrofit/retrofit_api.dart

@ -37,11 +37,11 @@ import 'data/wx_pay.dart';
part 'retrofit_api.g.dart'; part 'retrofit_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; /// const baseUrl = "https://pos.platform.lotus-wallet.com/app/"; ///
const base_url = "http://192.168.10.236:8766/app/"; /// // const base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "http://192.168.10.236:8766/app/"; /// // const baseUrl = "http://192.168.10.236:8766/app/"; ///
// const base_url = "http://192.168.10.37:8766/app/"; // const base_url = "http://192.168.10.37:8766/app/";
// const baseUrl = "http://192.168.10.37:8766/app/"; // const baseUrl = "http://192.168.10.37:8766/app/";

4
lib/union/union_details_page.dart

@ -265,8 +265,8 @@ class _UnionDetailsPage extends State<UnionDetailsPage> {
"tenantCode": storeInfo.tenantCode, "tenantCode": storeInfo.tenantCode,
if (latitude != null && longitude != null) if (latitude != null && longitude != null)
"position": "$latitude,$longitude", "position": "$latitude,$longitude",
// "baseURL": "https://pos.api.lotus-wallet.com/app/", "baseURL": "https://pos.api.lotus-wallet.com/app/",
"baseURL": "http://192.168.10.236:8765/app/", // "baseURL": "http://192.168.10.236:8765/app/",
"uid": userId, "uid": userId,
"userInfo": { "userInfo": {
"nickname": nickname, "nickname": nickname,

40
lib/web/web_view/web_content.dart

@ -1,6 +1,7 @@
import 'package:chewie/chewie.dart'; import 'package:chewie/chewie.dart';
import 'package:flutter/services.dart';
import 'package:flutter_html/flutter_html.dart'; import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/image_render.dart'; import 'package:flutter_html/image_render.dart';
import 'package:chewie/src/chewie_progress_colors.dart' as chewie; import 'package:chewie/src/chewie_progress_colors.dart' as chewie;
@ -106,15 +107,7 @@ class _WebContent extends State<WebContent> {
Widget videoWidget(double width, double height, src, sandboxMode) { Widget videoWidget(double width, double height, src, sandboxMode) {
print("src : $src"); print("src : $src");
return MediaQuery( chewieAudioController = ChewieController(
data: MediaQuery.of(context).copyWith(
textScaleFactor: 0.9,
),
child: Container(
width: MediaQuery.of(context).size.width - 17,
height: (MediaQuery.of(context).size.width) / (width / height),
child: chewies = Chewie(
controller: chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController = videoPlayerController: videoPlayerController =
VideoPlayerController.network( VideoPlayerController.network(
src, src,
@ -125,6 +118,11 @@ class _WebContent extends State<WebContent> {
// //
looping: false, looping: false,
// //
allowFullScreen: true,
// systemOverlaysAfterFullScreen: [],
// systemOverlaysOnEnterFullScreen: [],
// deviceOrientationsAfterFullScreen: [],
// deviceOrientationsOnEnterFullScreen: [],
// //
materialProgressColors: chewie.ChewieProgressColors( materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white, playedColor: Colors.white,
@ -133,12 +131,36 @@ class _WebContent extends State<WebContent> {
bufferedColor: Colors.transparent, bufferedColor: Colors.transparent,
), ),
autoInitialize: true, autoInitialize: true,
);
chewieAudioController.addListener(_fullScreenListener);
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaleFactor: textScaleFactor,
), ),
child: Container(
width: MediaQuery.of(context).size.width - 17,
height: (MediaQuery.of(context).size.width) / (width / height),
child: chewies = Chewie(
controller: chewieAudioController,
), ),
), ),
); );
} }
Future<void> _fullScreenListener() async {
print("object: isPlaying: ${videoPlayerController.value.isPlaying}");
print("object: isFullScreen: ${chewieAudioController.isFullScreen}");
if (!chewieAudioController.isFullScreen) {
textScaleFactor = 1;
setState(() {});
}
}
double textScaleFactor = 0.9;
Widget audioWidget(showControls, loop, autoplay, src, width) { Widget audioWidget(showControls, loop, autoplay, src, width) {
return Container( return Container(
width: width, width: width,

Loading…
Cancel
Save