喊话相关 还有些网络请求的head参数 app信息库
This commit is contained in:
parent
9e6189fc1b
commit
e065158817
BIN
circle_app/assets/images/base/icon_login.png
Normal file
BIN
circle_app/assets/images/base/icon_login.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
circle_app/assets/images/mine/icon_play.png
Normal file
BIN
circle_app/assets/images/mine/icon_play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@ -1,7 +1,34 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../util/device.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
class AboutappLogic extends GetxController {
|
class AboutappLogic extends GetxController {
|
||||||
final AboutappState state = AboutappState();
|
final AboutappState state = AboutappState();
|
||||||
|
String version = "";
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
getVersion();
|
||||||
|
// getAppVersion();
|
||||||
|
|
||||||
|
}
|
||||||
|
getVersion() async {
|
||||||
|
final info = await PackageInfo.fromPlatform();
|
||||||
|
version = info.version;
|
||||||
|
update();
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future<void> getAppVersion() async {
|
||||||
|
final info = await PackageInfo.fromPlatform();
|
||||||
|
print(info.appName);
|
||||||
|
print(info.packageName);
|
||||||
|
print(info.version);
|
||||||
|
print(info.buildNumber);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,4 +2,5 @@ class AboutappState {
|
|||||||
AboutappState() {
|
AboutappState() {
|
||||||
///Initialize variables
|
///Initialize variables
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,12 +41,12 @@ class AboutappPage extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
||||||
children: [
|
children: [
|
||||||
// Image.asset(
|
Image.asset(
|
||||||
// getHomeImage("mine_circle"), // Replace with your image path
|
getBaseImage("icon_login"), // Replace with your image path
|
||||||
// width: double.infinity,
|
width: 100.sp,
|
||||||
// height: double.infinity,
|
height: 100.sp,
|
||||||
// fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
// ),
|
),
|
||||||
SizedBox(height: 20.sp),
|
SizedBox(height: 20.sp),
|
||||||
Text(
|
Text(
|
||||||
'圈子',
|
'圈子',
|
||||||
@ -161,7 +161,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'1.0.0',
|
logic.version,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFB7BECC),
|
color: Color(0xFFB7BECC),
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
|
|||||||
@ -1,4 +1,6 @@
|
|||||||
|
import 'dart:async';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@ -6,6 +8,8 @@ import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
||||||
|
import 'package:video_player/video_player.dart';
|
||||||
|
import 'package:video_thumbnail/video_thumbnail.dart';
|
||||||
|
|
||||||
import '../../network/api.dart';
|
import '../../network/api.dart';
|
||||||
import '../../network/dio_manager.dart';
|
import '../../network/dio_manager.dart';
|
||||||
@ -13,6 +17,7 @@ import '../../router/app_routers.dart';
|
|||||||
import '../login/complete_material/logic.dart';
|
import '../login/complete_material/logic.dart';
|
||||||
import '../select_circle/logic.dart';
|
import '../select_circle/logic.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
import '../../common/config.dart';
|
||||||
|
|
||||||
class Call_outLogic extends GetxController {
|
class Call_outLogic extends GetxController {
|
||||||
final Call_outState state = Call_outState();
|
final Call_outState state = Call_outState();
|
||||||
@ -23,10 +28,24 @@ class Call_outLogic extends GetxController {
|
|||||||
final ImagePicker _picker = ImagePicker();
|
final ImagePicker _picker = ImagePicker();
|
||||||
var storage = Storage();
|
var storage = Storage();
|
||||||
var quToken = '';
|
var quToken = '';
|
||||||
|
VideoPlayerController? videoPlayerController;
|
||||||
|
|
||||||
|
List<MyConfigData> numbers = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() async{
|
void onClose() {
|
||||||
|
super.onClose();
|
||||||
|
videoPlayerController?.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
videoPlayerController?.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
var data =
|
var data =
|
||||||
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||||
@ -34,24 +53,66 @@ class Call_outLogic extends GetxController {
|
|||||||
data, (data) => ConfigBean.fromJson(data));
|
data, (data) => ConfigBean.fromJson(data));
|
||||||
configBean = bean.data!;
|
configBean = bean.data!;
|
||||||
|
|
||||||
|
var quniuData =
|
||||||
|
await DioManager.instance.get(url: Api.getqiniuToken, params: {});
|
||||||
var quniuData = await DioManager.instance.get(url: Api.getqiniuToken, params: {});
|
|
||||||
var qiniuBean = BaseResponse<QnTokenData>.fromJson(
|
var qiniuBean = BaseResponse<QnTokenData>.fromJson(
|
||||||
quniuData, (quniuData) => QnTokenData.fromJson(quniuData));
|
quniuData, (quniuData) => QnTokenData.fromJson(quniuData));
|
||||||
quToken = qiniuBean.data!.token.toString();
|
quToken = qiniuBean.data!.token.toString();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
List<MyConfigData> numbers = [];
|
|
||||||
|
sendShout() async {
|
||||||
|
if (numbers.isEmpty) {
|
||||||
|
showToast("选择圈子");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (textEditingController.text.isEmpty) {
|
||||||
|
showToast("请输入喊话内容");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (state.imaglist.isEmpty || state.videolist.isEmpty) {
|
||||||
|
if (textEditingController.text.length < 50) {
|
||||||
|
showToast("内容不丰富");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (!state.imaglist.isEmpty) {
|
||||||
|
if (textEditingController.text.length < 10) {
|
||||||
|
showToast("内容不丰富");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!state.videolist.isEmpty) {
|
||||||
|
if (textEditingController.text.length < 10) {
|
||||||
|
showToast("内容不丰富");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List myBean = [];
|
||||||
|
if (!state.imaglist.isEmpty){
|
||||||
|
state.imaglist.forEach((element) {
|
||||||
|
myBean.add(MyBean(type: 1, url: element).toJson());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (!state.videolist.isEmpty){
|
||||||
|
myBean.add(MyBean(type: 1, url: state.videolist[0]).toJson());
|
||||||
|
}
|
||||||
|
print(myBean.toString());
|
||||||
|
var data = await DioManager.instance.post(url: Api.SendShout, params: {
|
||||||
|
'album': myBean,
|
||||||
|
'content': textEditingController.text,
|
||||||
|
'interest_id': numbers[0].id,
|
||||||
|
'useQueen': isCheck,
|
||||||
|
});
|
||||||
|
|
||||||
|
//Navigator.pop(context, numbers);
|
||||||
|
}
|
||||||
|
|
||||||
startSelectCircleActivity() async {
|
startSelectCircleActivity() async {
|
||||||
var data = await Get.toNamed(AppRoutes.SelectCircleActivity,
|
var data = await Get.toNamed(AppRoutes.SelectCircleActivity,
|
||||||
arguments: {
|
arguments: {"interestMap": configBean.interestMap, "isRodio": true});
|
||||||
"interestMap":
|
if (null != data) {
|
||||||
configBean.interestMap,
|
|
||||||
"isRodio": true
|
|
||||||
});
|
|
||||||
if(null!=data){
|
|
||||||
numbers = data;
|
numbers = data;
|
||||||
circleName = numbers[0].name;
|
circleName = numbers[0].name;
|
||||||
|
|
||||||
@ -59,30 +120,56 @@ class Call_outLogic extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showImg() async {
|
showImg() async {
|
||||||
try {
|
try {
|
||||||
if(state.imaglist.length==9){
|
if (state.videolist.isNotEmpty) {
|
||||||
showToast("最多上传9张图片哦~");
|
showToast("已添加图片,无法添加图片。");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final XFile? pickedFile = await _picker.pickImage(source: ImageSource.gallery,);
|
if (state.imaglist.length == 6) {
|
||||||
// setState(() {
|
showToast("最多上传6张图片哦~");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final XFile? pickedFile = await _picker.pickImage(
|
||||||
|
source: ImageSource.gallery,
|
||||||
|
);
|
||||||
_setImageFileListFromFile(pickedFile!);
|
_setImageFileListFromFile(pickedFile!);
|
||||||
// });
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
// setState(() {
|
|
||||||
// _pickImageError = e;
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<ThumbnailResult> getFirstPic(url) async {
|
||||||
|
Uint8List? bytes = await VideoThumbnail.thumbnailData(video: url);
|
||||||
|
final Completer<ThumbnailResult> completer = Completer();
|
||||||
|
if (bytes != null) {
|
||||||
|
int _imageDataSize = bytes.length;
|
||||||
|
print("image size: $_imageDataSize");
|
||||||
|
|
||||||
|
final _image = Image.memory(bytes);
|
||||||
|
_image.image
|
||||||
|
.resolve(ImageConfiguration())
|
||||||
|
.addListener(ImageStreamListener((ImageInfo info, bool _) {
|
||||||
|
completer.complete(ThumbnailResult(
|
||||||
|
image: _image,
|
||||||
|
dataSize: _imageDataSize,
|
||||||
|
height: info.image.height,
|
||||||
|
width: info.image.width,
|
||||||
|
));
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
return completer.future;
|
||||||
|
}
|
||||||
|
|
||||||
void _setImageFileListFromFile(XFile pickedFile) {
|
void _setImageFileListFromFile(XFile pickedFile) {
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
|
String imgPath = CONFIG.CALL_OUT_IMAGE + pickedFile.name;
|
||||||
PutController putController = PutController();
|
PutController putController = PutController();
|
||||||
putController.addStatusListener((StorageStatus status) {
|
putController.addStatusListener((StorageStatus status) {
|
||||||
if (status == StorageStatus.Success) {
|
if (status == StorageStatus.Success) {
|
||||||
var headUrl = "http://qiniuyun.ikuayou.com/" + pickedFile.name;
|
var headUrl = CONFIG.IMAGE_HEAD + imgPath;
|
||||||
state.imaglist.add(headUrl);
|
state.imaglist.add(headUrl);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
@ -91,28 +178,113 @@ class Call_outLogic extends GetxController {
|
|||||||
print('状态变化: 当前任务状态:$status');
|
print('状态变化: 当前任务状态:$status');
|
||||||
});
|
});
|
||||||
storage.putFile(File(pickedFile.path), quToken,
|
storage.putFile(File(pickedFile.path), quToken,
|
||||||
options: PutOptions(controller: putController, key: pickedFile.name));
|
options: PutOptions(
|
||||||
|
controller: putController,
|
||||||
|
key: imgPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
showVideo() async {
|
showVideo() async {
|
||||||
if(state.imaglist.length!=0){
|
if (state.imaglist.length != 0) {
|
||||||
showToast("不可以和图片一起上传哦~");
|
showToast("已添加图片,无法添加视频。");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (state.videolist.length == 6) {
|
||||||
|
showToast("最多上传6个视频哦~");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
final XFile? pickedFile = await _picker.pickVideo(
|
final XFile? pickedFile = await _picker.pickVideo(
|
||||||
source: ImageSource.gallery,
|
source: ImageSource.gallery,
|
||||||
);
|
);
|
||||||
// setState(() {
|
print(pickedFile!.path.toString());
|
||||||
_setImageFileListFromFile(pickedFile!);
|
videoPlayerController = VideoPlayerController.file(
|
||||||
// });
|
File(pickedFile!.path),
|
||||||
} catch (e) {
|
videoPlayerOptions: VideoPlayerOptions(mixWithOthers: true),
|
||||||
// setState(() {
|
);
|
||||||
// _pickImageError = e;
|
await videoPlayerController?.initialize();
|
||||||
// });
|
final Duration videoDuration = videoPlayerController!.value.duration;
|
||||||
}
|
final double durationInSeconds = videoDuration.inSeconds.toDouble();
|
||||||
|
print(durationInSeconds.toString());
|
||||||
|
if (durationInSeconds >= 5 && durationInSeconds <= 30) {
|
||||||
|
videoPlayerController?.setLooping(true);
|
||||||
|
videoPlayerController?.addListener(() {
|
||||||
|
if (!videoPlayerController!.value.isPlaying) {
|
||||||
|
// Navigator.pop(context);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
_setVideoFileListFromFile(pickedFile!);
|
||||||
|
}else{
|
||||||
|
showToast("请上传5-30秒的视频");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _setVideoFileListFromFile(XFile pickedFile) {
|
||||||
|
SmartDialog.showLoading();
|
||||||
|
String videoPath = CONFIG.CALL_OUT_VIDEO + pickedFile.name;
|
||||||
|
PutController putController = PutController();
|
||||||
|
putController.addStatusListener((StorageStatus status) async {
|
||||||
|
print('状态变化: 当前任务状态:$status');
|
||||||
|
if (status == StorageStatus.Success) {
|
||||||
|
// var img = await getFirstPic(CONFIG.IMAGE_HEAD + pickedFile.name);
|
||||||
|
state.videolist.add(CONFIG.IMAGE_HEAD + videoPath);
|
||||||
|
//state.videoThumbnaillist =img;
|
||||||
|
print(CONFIG.IMAGE_HEAD + videoPath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
update();
|
||||||
|
SmartDialog.dismiss();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
storage.putFile(File(pickedFile.path), quToken,
|
||||||
|
options: PutOptions(
|
||||||
|
controller: putController,
|
||||||
|
key: CONFIG.CALL_OUT_VIDEO + pickedFile.name));
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<ClosedCaptionFile> _loadCaptions(BuildContext context) async {
|
||||||
|
final String fileContents = await DefaultAssetBundle.of(context)
|
||||||
|
.loadString('assets/bumble_bee_captions.vtt');
|
||||||
|
return WebVTTCaptionFile(
|
||||||
|
fileContents); // For vtt files, use WebVTTCaptionFile
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyBean {
|
||||||
|
int type;
|
||||||
|
String url;
|
||||||
|
|
||||||
|
MyBean({required this.type, required this.url});
|
||||||
|
|
||||||
|
factory MyBean.fromJson(Map<String, dynamic> json) {
|
||||||
|
return MyBean(
|
||||||
|
type: json['type'],
|
||||||
|
url: json['url'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
return {
|
||||||
|
'type': type,
|
||||||
|
'url': url,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class ThumbnailResult {
|
||||||
|
final Image image;
|
||||||
|
final int dataSize;
|
||||||
|
final int height;
|
||||||
|
final int width;
|
||||||
|
|
||||||
|
const ThumbnailResult(
|
||||||
|
{required this.image,
|
||||||
|
required this.dataSize,
|
||||||
|
required this.height,
|
||||||
|
required this.width});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
|
import 'logic.dart';
|
||||||
|
|
||||||
class Call_outState {
|
class Call_outState {
|
||||||
Call_outState() {
|
Call_outState() {
|
||||||
///Initialize variables
|
///Initialize variables
|
||||||
}
|
}
|
||||||
List<String> imaglist = ["https://book.flutterchina.club/assets/img/logo.png",
|
List<String> imaglist = [];
|
||||||
"https://book.flutterchina.club/assets/img/logo.png",
|
List<String> videolist = [];
|
||||||
"https://book.flutterchina.club/assets/img/logo.png",
|
|
||||||
"https://book.flutterchina.club/assets/img/logo.png",
|
|
||||||
"https://book.flutterchina.club/assets/img/logo.png",
|
|
||||||
"https://book.flutterchina.club/assets/img/logo.png",];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'package:circle_app/util/util.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:video_player/video_player.dart';
|
||||||
|
|
||||||
import '../../router/app_routers.dart';
|
import '../../router/app_routers.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@ -36,7 +37,9 @@ class Call_outPage extends StatelessWidget {
|
|||||||
width: 54.sp,
|
width: 54.sp,
|
||||||
),
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showToast('111');
|
//
|
||||||
|
//showToast('111');
|
||||||
|
logic.sendShout();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
@ -117,7 +120,8 @@ class Call_outPage extends StatelessWidget {
|
|||||||
maxLength: 200,
|
maxLength: 200,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintStyle: TextStyle(
|
hintStyle: TextStyle(
|
||||||
color: Color.fromRGBO(255, 255, 255, 0.6),
|
color: Color.fromRGBO(
|
||||||
|
255, 255, 255, 0.6),
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
hintText: '请输入...(左下角上传图片或视频哦)',
|
hintText: '请输入...(左下角上传图片或视频哦)',
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
@ -128,16 +132,19 @@ class Call_outPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
right: 15.sp,
|
right: 15.sp,
|
||||||
top: 190.sp,
|
top: 190.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
'${controller.textEditingController.text.length}/200',
|
'${controller.textEditingController.text.length}/200',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 12.sp),
|
||||||
)),
|
)),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 220.sp),
|
||||||
|
child: _imageAdapter(controller)),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 220.sp,left: 15.sp,right: 15.sp),
|
||||||
|
|
||||||
Container(
|
child:_showVideo(controller) ,)
|
||||||
margin: EdgeInsets.only(top: 220.sp),
|
|
||||||
child: _imageAdapter(controller))
|
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -216,8 +223,56 @@ class Call_outPage extends StatelessWidget {
|
|||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget _showVideo(Call_outLogic controller) {
|
||||||
|
if (controller.videoPlayerController == null) {
|
||||||
|
return Container();
|
||||||
|
} else {
|
||||||
|
return Container(
|
||||||
|
width:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 135.sp : 240.sp,
|
||||||
|
height:controller.videoPlayerController!.value.size.width < controller.videoPlayerController!.value.size.height ? 240.sp :135.sp,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if(controller.videoPlayerController!.value.isPlaying){
|
||||||
|
controller.videoPlayerController!.pause();
|
||||||
|
}else{
|
||||||
|
controller.videoPlayerController!.play();
|
||||||
|
}
|
||||||
|
controller.update();
|
||||||
|
},
|
||||||
|
child: AspectRatio(
|
||||||
|
aspectRatio: controller.videoPlayerController!.value.aspectRatio,
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
VideoPlayer(controller.videoPlayerController!),
|
||||||
|
Center(child:controller.videoPlayerController!.value.isPlaying ? Container() : Image(image: AssetImage(getMineImage("icon_play")),width: 30.sp,height: 30.sp,),),
|
||||||
|
Positioned(
|
||||||
|
top: 0,
|
||||||
|
right: 0,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
// showToast("删除");
|
||||||
|
_showDelVideoDialog(Get.context!, controller);
|
||||||
|
},
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getMineImage("icon_img_del")),
|
||||||
|
width: 20.sp,
|
||||||
|
height: 20.sp,
|
||||||
|
),
|
||||||
|
))
|
||||||
|
|
||||||
|
// ClosedCaption(text: controller.videoPlayerController!.value.caption.text),
|
||||||
|
// _ControlsOverlay(controller: controller.videoPlayerController),
|
||||||
|
// VideoProgressIndicator(controller.videoPlayerController!, allowScrubbing: true),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Widget _imageAdapter(Call_outLogic controller) {
|
Widget _imageAdapter(Call_outLogic controller) {
|
||||||
return GridView.builder(
|
return GridView.builder(
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
@ -225,18 +280,17 @@ class Call_outPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
itemCount: controller.state.imaglist.length, // 项目的总数量,包括固定图片和接口获取的项目
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(5.sp),
|
margin: EdgeInsets.all(5.sp),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: _buildImageItem(
|
child: _buildImageItem(
|
||||||
controller.state.imaglist[index],
|
controller.state.imaglist[index], controller, index)),
|
||||||
controller,index)),
|
);
|
||||||
);
|
|
||||||
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Widget _buildImageItem(String url, Call_outLogic controller,int index) {
|
|
||||||
|
Widget _buildImageItem(String url, Call_outLogic controller, int index) {
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
@ -249,8 +303,8 @@ class Call_outPage extends StatelessWidget {
|
|||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(AppRoutes.Swiper, arguments: {
|
Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||||
'imaglist':controller.state.imaglist,
|
'imaglist': controller.state.imaglist,
|
||||||
'index':index
|
'index': index
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
@ -259,28 +313,170 @@ class Call_outPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
,
|
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
top: 0,
|
top: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// showToast("删除");
|
// showToast("删除");
|
||||||
_showDelImgDialog(Get.context!,controller,index);
|
_showDelImgDialog(Get.context!, controller, index);
|
||||||
|
},
|
||||||
},
|
child: Image(
|
||||||
child: Image(
|
image: AssetImage(getMineImage("icon_img_del")),
|
||||||
image: AssetImage(getMineImage("icon_img_del")),
|
width: 20.sp,
|
||||||
width: 20.sp,
|
height: 20.sp,
|
||||||
height: 20.sp,
|
),
|
||||||
),
|
))
|
||||||
))
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
void _showDelImgDialog(BuildContext context,Call_outLogic controller,int index) {
|
|
||||||
|
void _showDelImgDialog(
|
||||||
|
BuildContext context, Call_outLogic controller, int index) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 160.sp,
|
||||||
|
padding: EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"提示",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
"是否确认删除该照片。",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 30.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"否",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 24.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
controller.state.imaglist.removeAt(index);
|
||||||
|
controller.update();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"是",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void _showDelVideoDialog(
|
||||||
|
BuildContext context, Call_outLogic controller) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@ -330,7 +526,7 @@ class Call_outPage extends StatelessWidget {
|
|||||||
top: 12.sp, left: 14.sp, right: 14.sp),
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
"是否确认删除该形象照。",
|
"是否确认删除该视频。",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
@ -375,9 +571,8 @@ class Call_outPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
controller.state.imaglist.removeAt(index);
|
controller.videoPlayerController=null;
|
||||||
controller.update();
|
controller.update();
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(top: 24.sp),
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
|||||||
@ -7,7 +7,8 @@ import '../../network/dio_manager.dart';
|
|||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class CircleLogic extends GetxController {
|
class CircleLogic extends GetxController {
|
||||||
PageController pageController = PageController(initialPage: 1, viewportFraction: 0.8);
|
PageController pageController =
|
||||||
|
PageController(initialPage: 1, viewportFraction: 0.8);
|
||||||
InterestsBean circle = InterestsBean(lists: []);
|
InterestsBean circle = InterestsBean(lists: []);
|
||||||
final CircleState state = CircleState();
|
final CircleState state = CircleState();
|
||||||
int page = 1;
|
int page = 1;
|
||||||
@ -33,19 +34,24 @@ class CircleLogic extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outCircle(String interest_id, bool isStatus) async {
|
||||||
outCircle(String interest_id,bool isStatus) async{
|
var data = await DioManager.instance.post(
|
||||||
var data = await DioManager.instance.post(url: Api.outCrrcle+interest_id+"/join", params: {"status": isStatus?"0":"1"});
|
url: Api.outCrrcle + interest_id + "/join",
|
||||||
|
params: {"status": isStatus ? "0" : "1"});
|
||||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||||
if (bean.code == 200) {
|
if (bean.code == 200) {
|
||||||
circle.lists.forEach((element) {
|
circle.lists.forEach((element) {
|
||||||
if(element.id.toString()==interest_id.toString()){
|
if (element.id.toString() == interest_id.toString()) {
|
||||||
element.isJoin = !isStatus;
|
element.isJoin = !isStatus;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
showToast(bean.msg);
|
showToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCircleIndexId() {
|
||||||
|
return circle.lists[state.index].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class InterestsBean {
|
class InterestsBean {
|
||||||
|
|||||||
@ -284,4 +284,202 @@ class _CirclePageState extends State<CirclePage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _showTextContentDialog(BuildContext context, String msg) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 300.sp,
|
||||||
|
padding: EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
msg,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showOutCircleDialog(
|
||||||
|
BuildContext context, CircleLogic controller, Circle bean) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 160.sp,
|
||||||
|
padding: EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.all(1.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [Color(0xFF4C3E5F), Color(0xFF324140)],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Text(
|
||||||
|
"提示",
|
||||||
|
style:
|
||||||
|
TextStyle(color: Colors.white, fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
"是否确认退出该圈子。",
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 30.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
Color(0x26FFFFFF),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"否",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 24.sp),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Navigator.pop(context);
|
||||||
|
logic.outCircle(bean.id.toString(), bean.isJoin);
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF06F9FA),
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 10.sp,
|
||||||
|
bottom: 10.sp,
|
||||||
|
left: 52.sp,
|
||||||
|
right: 52.sp),
|
||||||
|
child: Text(
|
||||||
|
"是",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class FeedbackLogic extends GetxController {
|
|||||||
putController.addStatusListener((StorageStatus status) {
|
putController.addStatusListener((StorageStatus status) {
|
||||||
print('状态变化: 当前任务状态:$status');
|
print('状态变化: 当前任务状态:$status');
|
||||||
});
|
});
|
||||||
storage.putFile(File(pickedFile.path), "",options: PutOptions(controller: putController));
|
// storage.putFile(File(pickedFile.path), quToken,
|
||||||
|
// options: PutOptions(controller: putController, key: CONFIG.USER_INFO_HEAD+pickedFile.name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:circle_app/network/dio_manager.dart';
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
import 'package:circle_app/router/app_routers.dart';
|
import 'package:circle_app/router/app_routers.dart';
|
||||||
@ -9,6 +10,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:image_picker/image_picker.dart';
|
import 'package:image_picker/image_picker.dart';
|
||||||
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
||||||
|
|
||||||
|
import '../../../common/config.dart';
|
||||||
import '../../../network/api.dart';
|
import '../../../network/api.dart';
|
||||||
import '../../../util/device.dart';
|
import '../../../util/device.dart';
|
||||||
import '../../select_circle/logic.dart';
|
import '../../select_circle/logic.dart';
|
||||||
@ -79,7 +81,7 @@ class Complete_materialLogic extends GetxController {
|
|||||||
PutController putController = PutController();
|
PutController putController = PutController();
|
||||||
putController.addStatusListener((StorageStatus status) {
|
putController.addStatusListener((StorageStatus status) {
|
||||||
if (status == StorageStatus.Success) {
|
if (status == StorageStatus.Success) {
|
||||||
headUrl = "http://qiniuyun.ikuayou.com/" + pickedFile.name;
|
headUrl = CONFIG.IMAGE_HEAD + pickedFile.name;
|
||||||
print(headUrl);
|
print(headUrl);
|
||||||
update();
|
update();
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
@ -87,7 +89,7 @@ class Complete_materialLogic extends GetxController {
|
|||||||
print('状态变化: 当前任务状态:$status');
|
print('状态变化: 当前任务状态:$status');
|
||||||
});
|
});
|
||||||
storage.putFile(File(pickedFile.path), quToken,
|
storage.putFile(File(pickedFile.path), quToken,
|
||||||
options: PutOptions(controller: putController, key: pickedFile.name));
|
options: PutOptions(controller: putController, key: CONFIG.USER_INFO_AVATAR+pickedFile.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
checkInfo() async {
|
checkInfo() async {
|
||||||
@ -143,6 +145,8 @@ class Complete_materialLogic extends GetxController {
|
|||||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||||
if (bean.code == 200) {
|
if (bean.code == 200) {
|
||||||
Get.offAllNamed(AppRoutes.Home);
|
Get.offAllNamed(AppRoutes.Home);
|
||||||
|
}else{
|
||||||
|
showToast(bean.msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,38 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../util/CacheUtil.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
|
|
||||||
class SetupLogic extends GetxController {
|
class SetupLogic extends GetxController {
|
||||||
final SetupState state = SetupState();
|
final SetupState state = SetupState();
|
||||||
|
|
||||||
|
String cache = "";
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() async {
|
||||||
|
super.onInit();
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() async {
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
getCache();
|
||||||
|
}
|
||||||
|
|
||||||
|
getCache() async {
|
||||||
|
cache = await CacheUtil.loadCache();
|
||||||
|
print(cache);
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
startCaching() async {
|
||||||
|
CacheUtil.clearCache((result) {
|
||||||
|
cache = result;
|
||||||
|
update();
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:circle_app/components/my_app_bar.dart';
|
import 'package:circle_app/components/my_app_bar.dart';
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -14,95 +13,103 @@ import 'logic.dart';
|
|||||||
class SetupPage extends StatelessWidget {
|
class SetupPage extends StatelessWidget {
|
||||||
SetupPage({Key? key}) : super(key: key);
|
SetupPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final logic = Get.find<SetupLogic>();
|
|
||||||
final state = Get.find<SetupLogic>().state;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
// _getFormat(context);
|
// _getFormat(context);
|
||||||
return Container(
|
return GetBuilder<SetupLogic>(builder: (logic) {
|
||||||
decoration: BoxDecoration(
|
return Container(
|
||||||
image: DecorationImage(
|
decoration: BoxDecoration(
|
||||||
image: AssetImage(getBaseImage("home_back")),
|
image: DecorationImage(
|
||||||
fit: BoxFit.cover,
|
image: AssetImage(getBaseImage("home_back")),
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
child: Scaffold(
|
||||||
child: Scaffold(
|
backgroundColor: Colors.transparent,
|
||||||
backgroundColor: Colors.transparent,
|
appBar: MyAppBar(centerTitle: '设置',),
|
||||||
appBar: MyAppBar(centerTitle: '设置',),
|
body: SafeArea(
|
||||||
body: SafeArea(
|
child: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
children: [
|
||||||
// GestureDetector(
|
Row(
|
||||||
// onTap: () {
|
children: [
|
||||||
//
|
// GestureDetector(
|
||||||
// },
|
// onTap: () {
|
||||||
// child: Image.asset(
|
//
|
||||||
// getNavigatorImage("back"), // 将 @mipmap/icon_back 替换为相应的图像路径
|
// },
|
||||||
// width: 24, // 将 @dimen/dp_24 替换为相应的值
|
// child: Image.asset(
|
||||||
// height: 24, // 将 @dimen/dp_24 替换为相应的值
|
// getNavigatorImage("back"), // 将 @mipmap/icon_back 替换为相应的图像路径
|
||||||
// ),
|
// width: 24, // 将 @dimen/dp_24 替换为相应的值
|
||||||
// ),
|
// height: 24, // 将 @dimen/dp_24 替换为相应的值
|
||||||
// Spacer(),
|
// ),
|
||||||
// Text(
|
// ),
|
||||||
// '设置',
|
// Spacer(),
|
||||||
// style: TextStyle(
|
// Text(
|
||||||
// color: Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
// '设置',
|
||||||
// fontSize: 18.sp, // 将 18sp 替换为相应的值
|
// style: TextStyle(
|
||||||
// ),
|
// color: Color(0xFFF7FAFA), // 将 #fff7fafa 替换为相应的颜色值
|
||||||
// ),
|
// fontSize: 18.sp, // 将 18sp 替换为相应的值
|
||||||
// Spacer(),
|
// ),
|
||||||
|
// ),
|
||||||
|
// Spacer(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.sp), // 将 @dimen/dp_16 替换为相应的值
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.AccountActivity);
|
||||||
|
// controller.state.hearUrl
|
||||||
|
|
||||||
|
},
|
||||||
|
child: _buildItemRow('账号中心', getHomeImage("icon_in")),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 16.sp),
|
||||||
|
// _buildItemRow('隐私设置', getHomeImage("icon_in")),
|
||||||
|
// SizedBox(height: 16.sp),
|
||||||
|
// _buildItemRow('聊天设置', getHomeImage("icon_in")),
|
||||||
|
// SizedBox(height: 16.sp),
|
||||||
|
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.BlackActivity);
|
||||||
|
},
|
||||||
|
child: _buildItemRow('黑名单', getHomeImage("icon_in")),
|
||||||
|
),
|
||||||
|
SizedBox(height: 16.sp),
|
||||||
|
// _buildItemRow('系统权限管理', getHomeImage("icon_in")),
|
||||||
|
// SizedBox(height: 16.sp),
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
logic.startCaching();
|
||||||
|
},
|
||||||
|
child: _buildCacheItemRow('清除缓存', getHomeImage("icon_in"), context, logic),
|
||||||
|
),
|
||||||
|
|
||||||
|
SizedBox(height: 16.sp),
|
||||||
|
|
||||||
|
GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
Get.toNamed(AppRoutes.AboutAppActivity);
|
||||||
|
},
|
||||||
|
child: _buildItemRow('关于圈子', getHomeImage("icon_in")),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.sp), // 将 @dimen/dp_16 替换为相应的值
|
),),
|
||||||
GestureDetector(
|
);
|
||||||
behavior: HitTestBehavior.opaque,
|
});
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(AppRoutes.AccountActivity);
|
|
||||||
// controller.state.hearUrl
|
|
||||||
|
|
||||||
},
|
|
||||||
child: _buildItemRow('账号中心', getHomeImage("icon_in")),
|
|
||||||
),
|
|
||||||
|
|
||||||
SizedBox(height: 16.sp),
|
|
||||||
// _buildItemRow('隐私设置', getHomeImage("icon_in")),
|
|
||||||
// SizedBox(height: 16.sp),
|
|
||||||
// _buildItemRow('聊天设置', getHomeImage("icon_in")),
|
|
||||||
// SizedBox(height: 16.sp),
|
|
||||||
|
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(AppRoutes.BlackActivity);
|
|
||||||
},
|
|
||||||
child: _buildItemRow('黑名单', getHomeImage("icon_in")),
|
|
||||||
),
|
|
||||||
SizedBox(height: 16.sp),
|
|
||||||
// _buildItemRow('系统权限管理', getHomeImage("icon_in")),
|
|
||||||
// SizedBox(height: 16.sp),
|
|
||||||
_buildCacheItemRow('清除缓存', getHomeImage("icon_in"),context),
|
|
||||||
SizedBox(height: 16.sp),
|
|
||||||
|
|
||||||
GestureDetector(
|
|
||||||
behavior: HitTestBehavior.opaque,
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(AppRoutes.AboutAppActivity);
|
|
||||||
},
|
|
||||||
child: _buildItemRow('关于圈子', getHomeImage("icon_in")),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildItemRow(String text, String imagePath) {
|
Widget _buildItemRow(String text, String imagePath) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.sp), // 将 @dimen/dp_16 替换为相应的值
|
padding: EdgeInsets.symmetric(horizontal: 16.sp),
|
||||||
|
// 将 @dimen/dp_16 替换为相应的值
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -123,9 +130,11 @@ class SetupPage extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildCacheItemRow(String text, String imagePath,BuildContext context) {
|
Widget _buildCacheItemRow(String text, String imagePath, BuildContext context,
|
||||||
|
SetupLogic logic) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.sp), // 将 @dimen/dp_16 替换为相应的值
|
padding: EdgeInsets.symmetric(horizontal: 16.sp),
|
||||||
|
// 将 @dimen/dp_16 替换为相应的值
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -136,9 +145,9 @@ class SetupPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
// _getFormat(context),
|
// _getFormat(context),
|
||||||
Text(
|
Text(
|
||||||
'XXX', // 将 'XXX' 替换为相应的缓存大小值
|
logic.cache, // 将 'XXX' 替换为相应的缓存大小值
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFB7BECC), // 将 #ffb7becc 替换为相应的颜色值
|
color: Color(0xFFB7BECC), // 将 #ffb7becc 替换为相应的颜色值
|
||||||
fontSize: 14.sp, // 将 14sp 替换为相应的值
|
fontSize: 14.sp, // 将 14sp 替换为相应的值
|
||||||
@ -156,6 +165,4 @@ class SetupPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -34,7 +34,10 @@ class SplashLogic extends GetxController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showToast(bean.msg.toString());
|
showToast(bean.msg.toString());
|
||||||
|
if(bean.code == 500){
|
||||||
|
await Future.delayed(Duration(seconds: 5));
|
||||||
|
onInit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
circle_app/lib/app/util/device.dart
Normal file
1
circle_app/lib/app/util/device.dart
Normal file
@ -0,0 +1 @@
|
|||||||
|
// TODO Implement this library.
|
||||||
10
circle_app/lib/common/config.dart
Normal file
10
circle_app/lib/common/config.dart
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
class CONFIG{
|
||||||
|
static const IMAGE_HEAD = 'http://qiniuyun.ikuayou.com/';
|
||||||
|
|
||||||
|
|
||||||
|
static const CALL_OUT_VIDEO = 'call_out_video/';
|
||||||
|
|
||||||
|
static const CALL_OUT_IMAGE = 'call_out_image/';
|
||||||
|
|
||||||
|
static const USER_INFO_AVATAR = 'user_info_avatar/';
|
||||||
|
}
|
||||||
@ -37,4 +37,8 @@ class Api {
|
|||||||
|
|
||||||
//入圈出圈
|
//入圈出圈
|
||||||
static const outCrrcle = 'up-service/interest/';
|
static const outCrrcle = 'up-service/interest/';
|
||||||
|
|
||||||
|
|
||||||
|
//发布喊话
|
||||||
|
static const SendShout = 'up-service/callout';
|
||||||
}
|
}
|
||||||
@ -130,7 +130,9 @@ class DioManager {
|
|||||||
Options options = Options(
|
Options options = Options(
|
||||||
method: methodValues[method], headers: {
|
method: methodValues[method], headers: {
|
||||||
"Authorization": await getAuthorization(),
|
"Authorization": await getAuthorization(),
|
||||||
'version': await getDeviceId(),
|
'versionName': await getVersionName(),
|
||||||
|
'versionCode': await getVersionCode(),
|
||||||
|
'osVersion': await getDeviceId(),
|
||||||
'platform': Platform.isIOS ? '1' : '0',
|
'platform': Platform.isIOS ? '1' : '0',
|
||||||
'imei': await getImei(),
|
'imei': await getImei(),
|
||||||
'brand': await getBrand(),
|
'brand': await getBrand(),
|
||||||
|
|||||||
104
circle_app/lib/util/CacheUtil.dart
Normal file
104
circle_app/lib/util/CacheUtil.dart
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
|
class CacheUtil {
|
||||||
|
static dynamic loadCache() async {
|
||||||
|
try {
|
||||||
|
final _tempDir = await getTemporaryDirectory();
|
||||||
|
double value = await _getTotalSizeOfFilesInDir(_tempDir);
|
||||||
|
/*tempDir.list(followLinks: false,recursive: true).listen((file){
|
||||||
|
//打印每个缓存文件的路径
|
||||||
|
print(file.path);
|
||||||
|
});*/
|
||||||
|
print('临时目录大小: ' + value.toString());
|
||||||
|
return _renderSize(value);
|
||||||
|
} catch (err) {
|
||||||
|
print(err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///递归方式删除目录
|
||||||
|
static Future<Null> delDir(FileSystemEntity file) async {
|
||||||
|
try {
|
||||||
|
if (file is Directory) {
|
||||||
|
final List<FileSystemEntity> children = file.listSync();
|
||||||
|
for (final FileSystemEntity child in children) {
|
||||||
|
await delDir(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await file.delete();
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static Future<double> _getTotalSizeOfFilesInDir(
|
||||||
|
final FileSystemEntity file) async {
|
||||||
|
try {
|
||||||
|
if (file is File) {
|
||||||
|
int length = await file.length();
|
||||||
|
return double.parse(length.toString());
|
||||||
|
}
|
||||||
|
if (file is Directory) {
|
||||||
|
final List<FileSystemEntity> children = file.listSync();
|
||||||
|
double total = 0;
|
||||||
|
if (children != null)
|
||||||
|
for (final FileSystemEntity child in children)
|
||||||
|
total += await _getTotalSizeOfFilesInDir(child);
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///格式化文件大小
|
||||||
|
static _renderSize(double value) {
|
||||||
|
List<String> unitArr = []
|
||||||
|
..add('B')
|
||||||
|
..add('K')
|
||||||
|
..add('M')
|
||||||
|
..add('G');
|
||||||
|
int index = 0;
|
||||||
|
while (value > 1024) {
|
||||||
|
index++;
|
||||||
|
value = value / 1024;
|
||||||
|
}
|
||||||
|
String size = value.toStringAsFixed(2);
|
||||||
|
return size + unitArr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
static clearCache(MyCallback callback) async {
|
||||||
|
//此处展示加载loading
|
||||||
|
try {
|
||||||
|
final _tempDir = await getTemporaryDirectory();
|
||||||
|
double value = await _getTotalSizeOfFilesInDir(_tempDir);
|
||||||
|
print("$value");
|
||||||
|
if (value.toInt() <= 0) {
|
||||||
|
showToast("暂无缓存");
|
||||||
|
|
||||||
|
// Get.back();
|
||||||
|
} else if (value >= 0) {
|
||||||
|
// Get.back();
|
||||||
|
showToast("正在清理中···");
|
||||||
|
Future.delayed(Duration(seconds: 2), () async {
|
||||||
|
//删除缓存目录
|
||||||
|
await delDir(_tempDir);
|
||||||
|
await loadCache();
|
||||||
|
showToast("清理缓存成功");
|
||||||
|
callback("0KB");
|
||||||
|
});
|
||||||
|
return "正在清理中···";
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
showToast("清除缓存失败");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
typedef void MyCallback(String result);
|
||||||
@ -3,7 +3,8 @@ import 'dart:io';
|
|||||||
import 'package:device_info/device_info.dart';
|
import 'package:device_info/device_info.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
import 'package:geolocator/geolocator.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
//手机系统版本
|
||||||
Future<String> getDeviceId() async {
|
Future<String> getDeviceId() async {
|
||||||
String deviceId = "";
|
String deviceId = "";
|
||||||
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
|
final DeviceInfoPlugin deviceInfoPlugin = new DeviceInfoPlugin();
|
||||||
@ -23,6 +24,27 @@ Future<String> getDeviceId() async {
|
|||||||
return deviceId;
|
return deviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Future<String> getVersion() async {
|
||||||
|
String version = "";
|
||||||
|
final info = await PackageInfo.fromPlatform();
|
||||||
|
version = info.version;
|
||||||
|
return version;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> getVersionName() async {
|
||||||
|
String versionName = "";
|
||||||
|
final info = await PackageInfo.fromPlatform();
|
||||||
|
versionName = info.version;
|
||||||
|
return versionName;
|
||||||
|
}
|
||||||
|
Future<String> getVersionCode() async {
|
||||||
|
String versionCode = "";
|
||||||
|
final info = await PackageInfo.fromPlatform();
|
||||||
|
versionCode = info.buildNumber;
|
||||||
|
return versionCode;
|
||||||
|
}
|
||||||
|
//imei
|
||||||
Future<String> getImei() async {
|
Future<String> getImei() async {
|
||||||
String imei = "";
|
String imei = "";
|
||||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||||
@ -37,7 +59,7 @@ Future<String> getImei() async {
|
|||||||
}
|
}
|
||||||
return imei;
|
return imei;
|
||||||
}
|
}
|
||||||
|
//手机型号
|
||||||
Future<String> getBrand() async {
|
Future<String> getBrand() async {
|
||||||
String brand = '';
|
String brand = '';
|
||||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||||
|
|||||||
@ -68,8 +68,16 @@ dependencies:
|
|||||||
permission_handler: ^10.3.0
|
permission_handler: ^10.3.0
|
||||||
#loading
|
#loading
|
||||||
flutter_smart_dialog: 4.9.2
|
flutter_smart_dialog: 4.9.2
|
||||||
#获取位置信息
|
#获取位置信息
|
||||||
geolocator: ^9.0.2
|
geolocator: ^9.0.2
|
||||||
|
#获取视频第一帧
|
||||||
|
video_thumbnail: ^0.5.3
|
||||||
|
#获取应用程序信息
|
||||||
|
package_info_plus: ^1.4.3+1
|
||||||
|
#视频播放器
|
||||||
|
video_player: ^2.6.1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user