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. 64
      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';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
// const baseUrl = "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 base_url = "http://192.168.10.236:8766/app/"; ///
const baseUrl = "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 base_url = "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,
if (latitude != null && longitude != null)
"position": "$latitude,$longitude",
// "baseURL": "https://pos.api.lotus-wallet.com/app/",
"baseURL": "http://192.168.10.236:8765/app/",
"baseURL": "https://pos.api.lotus-wallet.com/app/",
// "baseURL": "http://192.168.10.236:8765/app/",
"uid": userId,
"userInfo": {
"nickname": nickname,

64
lib/web/web_view/web_content.dart

@ -1,6 +1,7 @@
import 'package:chewie/chewie.dart';
import 'package:flutter/services.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/image_render.dart';
import 'package:chewie/src/chewie_progress_colors.dart' as chewie;
@ -106,39 +107,60 @@ class _WebContent extends State<WebContent> {
Widget videoWidget(double width, double height, src, sandboxMode) {
print("src : $src");
chewieAudioController = ChewieController(
videoPlayerController: videoPlayerController =
VideoPlayerController.network(
src,
),
aspectRatio: width / height,
//
autoPlay: false,
//
looping: false,
//
allowFullScreen: true,
// systemOverlaysAfterFullScreen: [],
// systemOverlaysOnEnterFullScreen: [],
// deviceOrientationsAfterFullScreen: [],
// deviceOrientationsOnEnterFullScreen: [],
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,
handleColor: Colors.white,
backgroundColor: Colors.grey,
bufferedColor: Colors.transparent,
),
autoInitialize: true,
);
chewieAudioController.addListener(_fullScreenListener);
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaleFactor: 0.9,
textScaleFactor: textScaleFactor,
),
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.network(
src,
),
aspectRatio: width / height,
//
autoPlay: false,
//
looping: false,
//
//
materialProgressColors: chewie.ChewieProgressColors(
playedColor: Colors.white,
handleColor: Colors.white,
backgroundColor: Colors.grey,
bufferedColor: Colors.transparent,
),
autoInitialize: true,
),
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) {
return Container(
width: width,

Loading…
Cancel
Save