版本更新和ui细节
This commit is contained in:
parent
459e5ca108
commit
20d1a38988
@ -1,6 +1,13 @@
|
|||||||
package com.leyuan.app
|
package com.leyuan.app
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.os.PersistableBundle
|
||||||
|
import android.util.Log
|
||||||
import io.flutter.embedding.android.FlutterActivity
|
import io.flutter.embedding.android.FlutterActivity
|
||||||
|
|
||||||
class MainActivity: FlutterActivity() {
|
class MainActivity: FlutterActivity() {
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?, persistentState: PersistableBundle?) {
|
||||||
|
super.onCreate(savedInstanceState, persistentState)
|
||||||
|
Log.e("tag","11111111111")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
circle_app/assets/images/base/ic_launcher.png
Normal file
BIN
circle_app/assets/images/base/ic_launcher.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@ -1,10 +1,16 @@
|
|||||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// import 'package:flutter_install_app/flutter_install_app.dart';
|
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../network/api.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
import '../../util/util.dart';
|
import '../../util/util.dart';
|
||||||
|
import '../dialog/UpdateDialog.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
@ -14,7 +20,6 @@ class AboutappLogic extends GetxController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
// TODO: implement onInit
|
|
||||||
super.onInit();
|
super.onInit();
|
||||||
getVersion();
|
getVersion();
|
||||||
// getAppVersion();
|
// getAppVersion();
|
||||||
@ -27,23 +32,27 @@ class AboutappLogic extends GetxController {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
updataApk() async {
|
getUpVersion() async {
|
||||||
SmartDialog.showLoading();
|
var data = await DioManager.instance.get(url: Api.APP_VERSION);
|
||||||
var filePath = await getApplicationSupportDirectoryPath();
|
var bean = BaseResponse<UpdateInfo>.fromJson(
|
||||||
filePath = filePath+"kuayou.apk";
|
data, (data) => UpdateInfo.fromJson(data));
|
||||||
// var data = await DioManager.instance
|
if (bean.isSuccess() && bean.data.update == 1) {
|
||||||
// .download("https://xidi-official-website.oss-cn-shenzhen.aliyuncs.com/%E8%B7%A8%E5%8F%8B_2.3.4.apk", filePath, (received, total) {
|
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
||||||
// double progress = received / total * 100;
|
}
|
||||||
// print('Download progress: $progress%');
|
}
|
||||||
// })
|
|
||||||
// .then((value) =>
|
|
||||||
// print(value))
|
|
||||||
// .catchError((error) {
|
|
||||||
// SmartDialog.dismiss();
|
|
||||||
// print(error);
|
|
||||||
// });
|
|
||||||
// await AppInstaller.installApk(filePath, actionRequired: false);
|
|
||||||
|
|
||||||
|
void showReportDialog(
|
||||||
|
BuildContext context, bool isDismiss, UpdateInfo updateInfo) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: isDismiss,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return UpdateDialog(
|
||||||
|
isDismiss: isDismiss,
|
||||||
|
updateInfo: updateInfo,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> getAppVersion() async {
|
Future<void> getAppVersion() async {
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../../components/my_app_bar.dart';
|
import '../../components/my_app_bar.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
|
import '../dialog/UpdateDialog.dart';
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
|
|
||||||
|
|
||||||
@ -43,7 +45,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
// showToast("13");
|
// showToast("13");
|
||||||
},
|
},
|
||||||
child:Image.asset(
|
child:Image.asset(
|
||||||
getBaseImage("icon_login"), // Replace with your image path
|
getBaseImage("ic_launcher"), // Replace with your image path
|
||||||
width: 100.sp,
|
width: 100.sp,
|
||||||
height: 100.sp,
|
height: 100.sp,
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
@ -146,7 +148,7 @@ class AboutappPage extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
onTap: (){
|
onTap: (){
|
||||||
logic.updataApk();
|
logic.getUpVersion();
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@ -100,8 +100,8 @@ class BlacklistPage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.nickname,
|
item.nickname,
|
||||||
style: const TextStyle(color: Colors.white70,
|
style: TextStyle(color: Colors.white70,
|
||||||
fontSize: 12,
|
fontSize: 12.sp,
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.sp),
|
SizedBox(width: 4.sp),
|
||||||
@ -116,6 +116,8 @@ class BlacklistPage extends StatelessWidget {
|
|||||||
width: 150.sp,
|
width: 150.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
item.signature,
|
item.signature,
|
||||||
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
|
maxLines: 1,
|
||||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -155,7 +155,9 @@ class Call_outLogic extends GetxController {
|
|||||||
if (beandata.isSuccess()) {
|
if (beandata.isSuccess()) {
|
||||||
showToast(beandata.msg);
|
showToast(beandata.msg);
|
||||||
final logic = Get.put(CircleLogic());
|
final logic = Get.put(CircleLogic());
|
||||||
|
logic.setCircle(numbers[0].id);
|
||||||
logic.refresh();
|
logic.refresh();
|
||||||
|
logic.update();
|
||||||
// Navigator.pop(Get.context!, numbers);
|
// Navigator.pop(Get.context!, numbers);
|
||||||
Get.back();
|
Get.back();
|
||||||
} else if (beandata.code == 30503) {
|
} else if (beandata.code == 30503) {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class CircleLogic extends GetxController {
|
|||||||
|
|
||||||
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",
|
url: "${Api.outCrrcle}$interest_id/join",
|
||||||
params: {"status": isStatus ? "0" : "1"});
|
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) {
|
||||||
@ -57,6 +57,15 @@ class CircleLogic extends GetxController {
|
|||||||
showToast(bean.msg);
|
showToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
setCircle(String circleId){
|
||||||
|
circle.lists.forEach((element) {
|
||||||
|
if (element.id.toString() == circleId.toString()) {
|
||||||
|
element.isJoin = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
//访问我的圈子人数
|
//访问我的圈子人数
|
||||||
loadCirclePeopleData() async {
|
loadCirclePeopleData() async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
|
|||||||
226
circle_app/lib/app/dialog/UpdateDialog.dart
Normal file
226
circle_app/lib/app/dialog/UpdateDialog.dart
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
|
import '../../main.dart';
|
||||||
|
import '../../network/dio_manager.dart';
|
||||||
|
import '../../util/util.dart';
|
||||||
|
|
||||||
|
class UpdateDialog extends StatefulWidget {
|
||||||
|
final bool isDismiss;
|
||||||
|
final UpdateInfo updateInfo;
|
||||||
|
|
||||||
|
UpdateDialog({required this.isDismiss, required this.updateInfo});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_CustomDialogState createState() => _CustomDialogState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _CustomDialogState extends State<UpdateDialog> {
|
||||||
|
double progress = 0;
|
||||||
|
bool isDownload = false;
|
||||||
|
|
||||||
|
void incrementCounter() {
|
||||||
|
setState(() {
|
||||||
|
progress = progress + 0.1;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void setDownloadUi() {
|
||||||
|
setState(() {
|
||||||
|
isDownload = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return WillPopScope(
|
||||||
|
onWillPop: () async {
|
||||||
|
return widget.isDismiss;
|
||||||
|
},
|
||||||
|
child: Dialog(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
child: Container(
|
||||||
|
height: 277.sp,
|
||||||
|
padding: const EdgeInsets.all(1.0),
|
||||||
|
child: Stack(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
|
gradient: const 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: const 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: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage(getBaseImage("ic_launcher")),
|
||||||
|
width: 70.sp,
|
||||||
|
height: 70.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
top: 12.sp, left: 14.sp, right: 14.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
widget.updateInfo.updateInfo,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
isDownload
|
||||||
|
? GestureDetector(
|
||||||
|
onTap: () async {
|
||||||
|
if (Platform.isIOS) {
|
||||||
|
final String appStoreUrl = 'https://apps.apple.com/app/id$iOSAPPid'; // App Store链接示例
|
||||||
|
if (await canLaunch(appStoreUrl)) {
|
||||||
|
await launch(appStoreUrl);
|
||||||
|
} else {
|
||||||
|
throw 'Could not open App Store.';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
updataApk(widget.updateInfo.downloadUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
//incrementCounter();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
value: progress,
|
||||||
|
backgroundColor: Colors.grey,
|
||||||
|
valueColor: const AlwaysStoppedAnimation<Color>(
|
||||||
|
Colors.blue),
|
||||||
|
strokeWidth: 4.0.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: GestureDetector(
|
||||||
|
behavior: HitTestBehavior.opaque,
|
||||||
|
onTap: () {
|
||||||
|
setDownloadUi();
|
||||||
|
|
||||||
|
//Navigator.pop(context);
|
||||||
|
// logic.setBlock();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 200.sp,
|
||||||
|
margin: EdgeInsets.only(top: 24.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: const 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: Center(
|
||||||
|
child: Text(
|
||||||
|
"立即更新",
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
updataApk(String downloadUrl) async {
|
||||||
|
//SmartDialog.showLoading();
|
||||||
|
var filePath = await getApplicationSupportDirectoryPath();
|
||||||
|
filePath = filePath + "kuayou.apk";
|
||||||
|
var data = await DioManager.instance
|
||||||
|
.download(
|
||||||
|
"https://xidi-official-website.oss-cn-shenzhen.aliyuncs.com/%E8%B7%A8%E5%8F%8B_2.3.4.apk",
|
||||||
|
filePath, (received, total) {
|
||||||
|
double progress = received / total * 100;
|
||||||
|
print('Download progress: $progress%');
|
||||||
|
})
|
||||||
|
.then((value) => print(value))
|
||||||
|
.catchError((error) {
|
||||||
|
// SmartDialog.dismiss();
|
||||||
|
print(error);
|
||||||
|
});
|
||||||
|
//await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
|
}
|
||||||
|
|
||||||
|
class UpdateInfo {
|
||||||
|
final String version; //最新版本号
|
||||||
|
final int update; //是否要更新
|
||||||
|
final int constraint; //是否强制
|
||||||
|
final String publishTime;
|
||||||
|
final String downloadUrl;
|
||||||
|
final String updateInfo;
|
||||||
|
|
||||||
|
UpdateInfo({
|
||||||
|
required this.version,
|
||||||
|
required this.update,
|
||||||
|
required this.constraint,
|
||||||
|
required this.publishTime,
|
||||||
|
required this.downloadUrl,
|
||||||
|
required this.updateInfo,
|
||||||
|
});
|
||||||
|
|
||||||
|
factory UpdateInfo.fromJson(Map<String, dynamic> json) {
|
||||||
|
return UpdateInfo(
|
||||||
|
version: json['version'],
|
||||||
|
update: json['update'],
|
||||||
|
constraint: json['constraint'],
|
||||||
|
publishTime: json['publish_time'],
|
||||||
|
downloadUrl: json['download_url'],
|
||||||
|
updateInfo: json['update_info'],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -110,9 +110,11 @@ class FriendslistPage extends StatelessWidget {
|
|||||||
|
|
||||||
SizedBox(height: 8.sp),
|
SizedBox(height: 8.sp),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 150.sp,
|
width: 200.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
item.signature,
|
item.signature,
|
||||||
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
|
maxLines: 1,
|
||||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
'04-10 19:51',
|
'04-10 19:51',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFB7BECC),
|
color: const Color(0xFFB7BECC),
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -165,7 +165,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 30.sp),
|
padding: EdgeInsets.only(bottom: 30.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
@ -189,7 +189,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
backgroundColor: Color(0xFF21BEAB),
|
backgroundColor: const Color(0xFF21BEAB),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 16.sp, vertical: 4.sp),
|
horizontal: 16.sp, vertical: 4.sp),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
@ -215,7 +215,7 @@ class HelpPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
backgroundColor: Color(0xFF21BEAB),
|
backgroundColor: const Color(0xFF21BEAB),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 16.sp, vertical: 4.sp),
|
horizontal: 16.sp, vertical: 4.sp),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|||||||
@ -6,9 +6,11 @@ import 'package:circle_app/network/dio_manager.dart';
|
|||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../circle/view.dart';
|
import '../circle/view.dart';
|
||||||
|
import '../dialog/UpdateDialog.dart';
|
||||||
import '../minefragment/view.dart';
|
import '../minefragment/view.dart';
|
||||||
import '../msg/view.dart';
|
import '../msg/view.dart';
|
||||||
import 'state.dart';
|
import 'state.dart';
|
||||||
@ -34,6 +36,33 @@ class HomeLogic extends GetxController {
|
|||||||
tabs.add(MinefragmentPage());
|
tabs.add(MinefragmentPage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onReady() async{
|
||||||
|
// TODO: implement onReady
|
||||||
|
super.onReady();
|
||||||
|
|
||||||
|
var data = await DioManager.instance.get(url: Api.APP_VERSION);
|
||||||
|
var bean = BaseResponse<UpdateInfo>.fromJson(
|
||||||
|
data, (data) => UpdateInfo.fromJson(data));
|
||||||
|
if(bean.isSuccess()&&bean.data.update==1){
|
||||||
|
showReportDialog(Get.context!,bean.data.constraint==0,bean.data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void showReportDialog(BuildContext context,bool isDismiss,UpdateInfo updateInfo) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: isDismiss,
|
||||||
|
builder: (BuildContext context) {
|
||||||
|
return UpdateDialog(isDismiss: isDismiss,updateInfo : updateInfo,);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void getIMData() async {
|
void getIMData() async {
|
||||||
// _coreInstance.;
|
// _coreInstance.;
|
||||||
|
|||||||
@ -23,9 +23,11 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return GetBuilder(builder: (HomeLogic controller) {
|
return GetBuilder(builder: (HomeLogic controller) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
controller.onReady();
|
||||||
// Get.toNamed(AppRoutes.Complete_materialPage);
|
// Get.toNamed(AppRoutes.Complete_materialPage);
|
||||||
},
|
},
|
||||||
child: ExitAppConfirmation(child: Stack(children: [
|
child: ExitAppConfirmation(child: Stack(children: [
|
||||||
|
|||||||
@ -27,7 +27,7 @@ class LikelistPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: const MyAppBar(
|
||||||
centerTitle: "喜欢我的",
|
centerTitle: "喜欢我的",
|
||||||
),
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
@ -117,17 +117,19 @@ class LikelistPage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.sp),
|
SizedBox(height: 8.sp),
|
||||||
Container(
|
SizedBox(
|
||||||
width: 150.sp,
|
width: 200.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
item.user.signature,
|
item.user.signature,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFB7BECC)),
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Pla
|
// Pla
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.setLike(index);
|
logic.setLike(index);
|
||||||
@ -136,7 +138,7 @@ class LikelistPage extends StatelessWidget {
|
|||||||
width: 75.sp,
|
width: 75.sp,
|
||||||
height: 28.sp,
|
height: 28.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFF4D7C),
|
color: const Color(0xFFFF4D7C),
|
||||||
borderRadius: BorderRadius.circular(14),
|
borderRadius: BorderRadius.circular(14),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
@ -162,7 +164,7 @@ class LikelistPage extends StatelessWidget {
|
|||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.sp),
|
borderRadius: BorderRadius.circular(17.sp),
|
||||||
gradient: LinearGradient(
|
gradient: const LinearGradient(
|
||||||
colors: [
|
colors: [
|
||||||
Color.fromRGBO(141, 255, 248, 1.0),
|
Color.fromRGBO(141, 255, 248, 1.0),
|
||||||
Color.fromRGBO(181, 211, 255, 1.0),
|
Color.fromRGBO(181, 211, 255, 1.0),
|
||||||
|
|||||||
@ -83,6 +83,8 @@ class MyfeedbacklistPage extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
height: 120.sp,
|
height: 120.sp,
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
|
scrollDirection: Axis.vertical,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3, // 每行显示的项目数量
|
crossAxisCount: 3, // 每行显示的项目数量
|
||||||
),
|
),
|
||||||
|
|||||||
@ -31,108 +31,93 @@ class UserinfoLogic extends GetxController {
|
|||||||
bool isShowAlbum = true;
|
bool isShowAlbum = true;
|
||||||
bool isLike = false;
|
bool isLike = false;
|
||||||
final startTime = DateTime.now();
|
final startTime = DateTime.now();
|
||||||
|
SharedPreferences? sharedPreferences;
|
||||||
@override
|
@override
|
||||||
void onInit() async {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
SmartDialog.showLoading();
|
SmartDialog.showLoading();
|
||||||
if (userId != '') {
|
|
||||||
SharedPreferences sharedPreferences =
|
sharedPreferences = await SharedPreferences.getInstance();
|
||||||
await SharedPreferences.getInstance();
|
int? sharedUserId = sharedPreferences!.getInt(SharedPreferencesHelper.USERID);
|
||||||
if (sharedPreferences.getInt(SharedPreferencesHelper.USERID) != 0 &&
|
|
||||||
sharedPreferences.getInt(SharedPreferencesHelper.USERID).toString() ==
|
if (userId.isNotEmpty && sharedUserId != null && sharedUserId.toString() == userId) {
|
||||||
userId) {
|
|
||||||
userId = '';
|
userId = '';
|
||||||
}
|
}
|
||||||
}
|
|
||||||
state.imaglist.clear();
|
state.imaglist.clear();
|
||||||
if (userId == '') {
|
|
||||||
isMe = true;
|
|
||||||
var data = await DioManager.instance.get(url: Api.getUserInfo);
|
|
||||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
|
||||||
data, (data) => ResponseBean.fromJson(data));
|
|
||||||
if (bean.isSuccess()) {
|
|
||||||
isLikeFoMsg =
|
|
||||||
"${bean.data.imageUrgeCount}位圈友感兴趣,其中${bean.data.likeMeCount}位已催您更新";
|
|
||||||
|
|
||||||
userInfoBean = bean.data.user;
|
if (userId.isEmpty) {
|
||||||
isVip = userInfoBean!.vip;
|
fetchUserInfo(Api.getUserInfo);
|
||||||
//访问自己强制在线
|
fetchMyAlbum(Api.getMyAlbum);
|
||||||
userInfoBean!.isOnline = true;
|
|
||||||
onLineCity = userInfoBean!.isOnline ? "在线" : "离线";
|
|
||||||
isOnline = userInfoBean!.isOnline;
|
|
||||||
if (userInfoBean!.city != null) {
|
|
||||||
onLineCity = "$onLineCity·${userInfoBean!.city}";
|
|
||||||
}
|
|
||||||
ageMsg = getAgeCOntent(userInfoBean!.gender, userInfoBean!.age,
|
|
||||||
userInfoBean!.role, userInfoBean!.orientation);
|
|
||||||
} else {
|
} else {
|
||||||
showToast(bean.msg);
|
fetchUserInfo("${Api.getUserInfoTA + userId}/home");
|
||||||
|
fetchMyAlbum("${Api.getTaAlbum + userId}/albums");
|
||||||
|
fetchUrgeStatus("${Api.getUrgeStatus + userId}/urge/album/status");
|
||||||
|
}
|
||||||
|
SmartDialog.dismiss();
|
||||||
|
fetchQnToken(Api.getqiniuToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
var myAlbumData = await DioManager.instance.get(
|
Future<void> fetchUserInfo(String url) async {
|
||||||
url: Api.getMyAlbum,
|
var data = await DioManager.instance.get(url: url);
|
||||||
);
|
|
||||||
var myAlbumBean = BaseResponse<AlbumResponseBean>.fromJson(myAlbumData,
|
|
||||||
(myAlbumData) => AlbumResponseBean.fromJson(myAlbumData));
|
|
||||||
if (myAlbumBean.isSuccess()) {
|
|
||||||
myAlbumBean.data.lists.forEach((element) {
|
|
||||||
state.imaglist.add(element);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
isMe = false;
|
|
||||||
var data = await DioManager.instance
|
|
||||||
.get(url: "${Api.getUserInfoTA + userId}/home");
|
|
||||||
var bean = BaseResponse<ResponseBean>.fromJson(
|
var bean = BaseResponse<ResponseBean>.fromJson(
|
||||||
data, (data) => ResponseBean.fromJson(data));
|
data, (data) => ResponseBean.fromJson(data));
|
||||||
|
|
||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
|
isMe = userId.isEmpty;
|
||||||
isLike = bean.data.isFollow;
|
isLike = bean.data.isFollow;
|
||||||
isLikeFoMsg =
|
isLikeFoMsg = "${bean.data.imageUrgeCount}位圈友感兴趣,其中${bean.data.likeMeCount}位已催您更新";
|
||||||
"${bean.data.imageUrgeCount}位圈友感兴趣,其中${bean.data.likeMeCount}位已催您更新";
|
userInfoBean = bean.data.user;
|
||||||
userInfoBean = bean.data!.user;
|
isVip = userInfoBean?.vip ?? 0;
|
||||||
isVip = userInfoBean!.vip;
|
|
||||||
imId = bean.data.accountId;
|
imId = bean.data.accountId;
|
||||||
onLineCity = userInfoBean!.isOnline == true ? "在线" : "离线";
|
if (isMe) {
|
||||||
if (userInfoBean!.city != null) {
|
isOnline = true;
|
||||||
onLineCity = "$onLineCity·${userInfoBean!.city}";
|
}else{
|
||||||
|
isOnline = userInfoBean!.isOnline;
|
||||||
}
|
}
|
||||||
|
onLineCity = isOnline ? "在线" : "离线";
|
||||||
ageMsg = getAgeCOntent(userInfoBean!.gender, userInfoBean!.age,
|
if (userInfoBean?.city != null) {
|
||||||
userInfoBean!.role, userInfoBean!.orientation);
|
onLineCity = "$onLineCity·${userInfoBean!.city}";
|
||||||
|
}else{
|
||||||
|
onLineCity = "$onLineCity·外星";
|
||||||
|
}
|
||||||
|
ageMsg = getAgeCOntent(userInfoBean!.gender, userInfoBean!.age, userInfoBean!.role, userInfoBean!.orientation);
|
||||||
} else {
|
} else {
|
||||||
showToast(bean.msg);
|
showToast(bean.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
var myAlbumData = await DioManager.instance
|
|
||||||
.get(url: "${Api.getTaAlbum + userId}/albums");
|
|
||||||
var myAlbumBean = BaseResponse<AlbumResponseBean>.fromJson(myAlbumData,
|
|
||||||
(myAlbumData) => AlbumResponseBean.fromJson(myAlbumData));
|
|
||||||
if (myAlbumBean.isSuccess()) {
|
|
||||||
myAlbumBean.data.lists.forEach((element) {
|
|
||||||
state.imaglist.add(AlbumListItem(
|
|
||||||
id: element.id, type: element.type, url: element.url));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
var urgedata = await DioManager.instance
|
|
||||||
.get(url: "${Api.getUrgeStatus + userId}/urge/album/status");
|
|
||||||
var urgeBean = BaseResponse<UrgentStatus>.fromJson(
|
|
||||||
urgedata, (urgedata) => UrgentStatus.fromJson(urgedata));
|
|
||||||
//if(urgedata.isSuccess()){
|
|
||||||
isUrgeStatus = urgeBean.data.isUrgent;
|
|
||||||
//}
|
|
||||||
}
|
|
||||||
update();
|
update();
|
||||||
SmartDialog.dismiss();
|
}
|
||||||
var data =
|
|
||||||
await DioManager.instance.get(url: Api.getqiniuToken, params: {});
|
Future<void> fetchMyAlbum(String url) async {
|
||||||
|
var myAlbumData = await DioManager.instance.get(url: url);
|
||||||
|
var myAlbumBean = BaseResponse<AlbumResponseBean>.fromJson(
|
||||||
|
myAlbumData, (myAlbumData) => AlbumResponseBean.fromJson(myAlbumData));
|
||||||
|
|
||||||
|
if (myAlbumBean.isSuccess()) {
|
||||||
|
state.imaglist.addAll(myAlbumBean.data.lists);
|
||||||
|
}
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> fetchUrgeStatus(String url) async {
|
||||||
|
var urgedata = await DioManager.instance.get(url: url);
|
||||||
|
var urgeBean = BaseResponse<UrgentStatus>.fromJson(
|
||||||
|
urgedata, (urgedata) => UrgentStatus.fromJson(urgedata));
|
||||||
|
isUrgeStatus = urgeBean.data?.isUrgent ?? false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> fetchQnToken(String url) async {
|
||||||
|
var data = await DioManager.instance.get(url: url, params: {});
|
||||||
var bean = BaseResponse<QnTokenData>.fromJson(
|
var bean = BaseResponse<QnTokenData>.fromJson(
|
||||||
data, (data) => QnTokenData.fromJson(data));
|
data, (data) => QnTokenData.fromJson(data));
|
||||||
if (bean.isSuccess()) {
|
if (bean.isSuccess()) {
|
||||||
quToken = bean.data!.token.toString();
|
quToken = bean.data?.token.toString() ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
urgeChange() async {
|
urgeChange() async {
|
||||||
var data = await DioManager.instance
|
var data = await DioManager.instance
|
||||||
.post(url: "${Api.urgeAlbum + userId}/urge/album");
|
.post(url: "${Api.urgeAlbum + userId}/urge/album");
|
||||||
|
|||||||
@ -1,6 +1,4 @@
|
|||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/app/chat/logic.dart';
|
|
||||||
import 'package:circle_app/app/userinfo/widgets/home_call_out.dart';
|
import 'package:circle_app/app/userinfo/widgets/home_call_out.dart';
|
||||||
import 'package:circle_app/main.dart';
|
import 'package:circle_app/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -22,6 +20,7 @@ class UserinfoPage extends StatefulWidget {
|
|||||||
class _MyTabbedScreenState extends State<UserinfoPage>
|
class _MyTabbedScreenState extends State<UserinfoPage>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
|
late PageController _pageController;
|
||||||
|
|
||||||
ScrollController scrollController = ScrollController();
|
ScrollController scrollController = ScrollController();
|
||||||
bool isShowBlackTitle = false;
|
bool isShowBlackTitle = false;
|
||||||
@ -29,8 +28,9 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
_pageController = PageController();
|
||||||
_tabController = TabController(
|
_tabController = TabController(
|
||||||
length: 2, vsync: this, animationDuration: const Duration(milliseconds: 200));
|
length: 2, vsync: this);
|
||||||
_tabController.animation!.addListener(_handleTabChange);
|
_tabController.animation!.addListener(_handleTabChange);
|
||||||
// _tabController.addListener(_handleTabChange);
|
// _tabController.addListener(_handleTabChange);
|
||||||
// _tabController
|
// _tabController
|
||||||
@ -144,10 +144,6 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
final chatButton = GestureDetector(
|
final chatButton = GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (logic.userInfoBean != null) {
|
if (logic.userInfoBean != null) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pushChatPage(logic.userInfoBean!.id.toString(),logic.imId, logic.userInfoBean!.nickname);
|
pushChatPage(logic.userInfoBean!.id.toString(),logic.imId, logic.userInfoBean!.nickname);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -199,10 +195,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
final interests = userInfoBean?.interests ?? [];
|
final interests = userInfoBean?.interests ?? [];
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 19.sp, vertical: 14.sp),
|
padding: EdgeInsets.symmetric(vertical: 14.sp),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 19.sp),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
_imagelistView(controller),
|
_imagelistView(controller),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -210,7 +209,11 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Row(
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 19.sp,),
|
||||||
|
margin: EdgeInsets.only(top: 19.sp),
|
||||||
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
@ -242,7 +245,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
Text(
|
Text(
|
||||||
controller.onLineCity,
|
controller.onLineCity,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12,
|
fontSize: 12.sp,
|
||||||
color: logic.isOnline
|
color: logic.isOnline
|
||||||
? const Color(0xFF00FFF4)
|
? const Color(0xFF00FFF4)
|
||||||
: const Color(0xFF787575),
|
: const Color(0xFF787575),
|
||||||
@ -252,17 +255,39 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 59.sp,
|
height: 59.sp,
|
||||||
child: ListView.builder(
|
|
||||||
|
child: _buildInterestsListView(interests),
|
||||||
|
),
|
||||||
|
titleTab(controller),
|
||||||
|
Expanded(
|
||||||
|
child: PageView(
|
||||||
|
controller: _pageController,
|
||||||
|
onPageChanged: (index) {
|
||||||
|
_tabController.animateTo(index);
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
_imageAdapter(controller),
|
||||||
|
HomeCallOutView(controller.userId),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Widget _buildInterestsListView(List<Interest> interests) {
|
||||||
|
return ListView.builder(
|
||||||
itemCount: interests.length,
|
itemCount: interests.length,
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
padding: EdgeInsets.symmetric(vertical: 18.sp),
|
padding: EdgeInsets.symmetric(vertical: 18.sp,horizontal: 19.sp),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final interest = interests[index];
|
final interest = interests[index];
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(right: 11.sp),
|
margin: EdgeInsets.only(right: 11.sp),
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(17.0),
|
borderRadius: BorderRadius.circular(17.0),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
@ -297,33 +322,17 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
|
||||||
),
|
|
||||||
titleTab(controller),
|
|
||||||
Expanded(
|
|
||||||
child: TabBarView(
|
|
||||||
controller: _tabController,
|
|
||||||
children: [
|
|
||||||
_imageAdapter(controller),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 26.sp),
|
|
||||||
child: HomeCallOutView(controller.userId),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Widget titleTab(UserinfoLogic controller) {
|
Widget titleTab(UserinfoLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 10.sp),
|
||||||
height: 27.sp,
|
height: 27.sp,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
@ -331,6 +340,14 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
TabBar(
|
TabBar(
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
|
indicator: UnderlineTabIndicator(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color:const Color(0xFF00FFF4) ,
|
||||||
|
width: 2.sp,
|
||||||
|
),
|
||||||
|
insets: EdgeInsets.symmetric(horizontal: 6.0.sp),
|
||||||
|
borderRadius: BorderRadius.circular(18.0),
|
||||||
|
),
|
||||||
indicatorColor: const Color(0xFF00FFF4),
|
indicatorColor: const Color(0xFF00FFF4),
|
||||||
indicatorWeight: 2.sp,
|
indicatorWeight: 2.sp,
|
||||||
labelColor: const Color(0xFF00FFF4),
|
labelColor: const Color(0xFF00FFF4),
|
||||||
@ -342,6 +359,13 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
Tab(text: "喊话"),
|
Tab(text: "喊话"),
|
||||||
],
|
],
|
||||||
|
onTap: (index){
|
||||||
|
_pageController.animateToPage(
|
||||||
|
index, // 目标页面索引
|
||||||
|
duration: const Duration(milliseconds: 300), // 动画时长
|
||||||
|
curve: Curves.ease, // 动画曲线
|
||||||
|
);
|
||||||
|
},
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -393,7 +417,9 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
|
|
||||||
|
|
||||||
Widget _imageAdapter(UserinfoLogic controller) {
|
Widget _imageAdapter(UserinfoLogic controller) {
|
||||||
return Stack(
|
return Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 19.sp),
|
||||||
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
Column(
|
||||||
children: [
|
children: [
|
||||||
@ -406,9 +432,8 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
|
||||||
margin: const EdgeInsets.only(bottom: 58.0),
|
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
|
padding: const EdgeInsets.only(bottom: 58.0),
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
@ -461,7 +486,6 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (logic.isMe)
|
if (logic.isMe)
|
||||||
@ -471,7 +495,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
bottom: 26.sp,
|
bottom: 26.sp,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var data = await Get.toNamed(
|
await Get.toNamed(
|
||||||
AppRoutes.Complete_materialPage,
|
AppRoutes.Complete_materialPage,
|
||||||
arguments: "user",
|
arguments: "user",
|
||||||
);
|
);
|
||||||
@ -506,6 +530,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,11 +577,12 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
|
|
||||||
Widget buildUserContainer(UserinfoLogic controller) {
|
Widget buildUserContainer(UserinfoLogic controller) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 1.sp, vertical: 14.sp),
|
margin: EdgeInsets.only( left: 3.sp),
|
||||||
height: 58.sp,
|
height: 58.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
image: AssetImage(getMineImage("icon_user_content")),
|
image: AssetImage(getMineImage("icon_user_content")),
|
||||||
|
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -581,6 +607,7 @@ class _MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|
||||||
width: 68.sp,
|
width: 68.sp,
|
||||||
height: 68.sp,
|
height: 68.sp,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:circle_app/app/circle/state.dart';
|
import 'package:circle_app/app/circle/state.dart';
|
||||||
import 'package:circle_app/app/circle/widgets/video_item.dart';
|
import 'package:circle_app/app/circle/widgets/video_item.dart';
|
||||||
@ -16,6 +15,7 @@ class HomeCallOutView extends StatefulWidget {
|
|||||||
// Get.lazyPut(() => ListLogic());
|
// Get.lazyPut(() => ListLogic());
|
||||||
|
|
||||||
String userId;
|
String userId;
|
||||||
|
|
||||||
HomeCallOutView(this.userId, {super.key});
|
HomeCallOutView(this.userId, {super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -23,7 +23,6 @@ class HomeCallOutView extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HomeCallOutViewState extends State<HomeCallOutView> {
|
class _HomeCallOutViewState extends State<HomeCallOutView> {
|
||||||
|
|
||||||
HomeCallOutLogic? listsLg;
|
HomeCallOutLogic? listsLg;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -56,7 +55,10 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
Container(
|
Container(
|
||||||
height: Get.height,
|
height: Get.height,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 30.sp),
|
margin: EdgeInsets.only(
|
||||||
|
bottom: MediaQuery.of(context).padding.bottom + 56.sp,
|
||||||
|
left: 19.sp,
|
||||||
|
right: 19.sp),
|
||||||
child: RefreshIndicator(
|
child: RefreshIndicator(
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
listLogic.refreshData();
|
listLogic.refreshData();
|
||||||
@ -78,9 +80,12 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(top: listLogic.callOutMore ? 0 : 10.sp),
|
margin: EdgeInsets.only(
|
||||||
child: loaddingWidget(
|
top: listLogic.callOutMore
|
||||||
listLogic.callOutMore),
|
? 0
|
||||||
|
: 10.sp),
|
||||||
|
child:
|
||||||
|
loaddingWidget(listLogic.callOutMore),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
@ -100,7 +105,6 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
double picHeight = 0.0;
|
double picHeight = 0.0;
|
||||||
|
|
||||||
int type = 0;
|
int type = 0;
|
||||||
@ -121,9 +125,21 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
double titleHeight = textWidth(lists.interest!['title']);
|
double titleHeight = textWidth(lists.interest!['title']);
|
||||||
double widgetHeight = 115.sp + contentHeight(lists.content!) + (picHeight > 0 ? picHeight + 5 : 0);
|
double widgetHeight = 115.sp +
|
||||||
|
contentHeight(lists.content!) +
|
||||||
|
(picHeight > 0 ? picHeight + 5 : 0);
|
||||||
|
|
||||||
return Container(
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 14.sp,bottom: 10.sp),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
lists.create_time.toString(),
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
height: widgetHeight,
|
height: widgetHeight,
|
||||||
@ -180,14 +196,15 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
listsLg?.pushMsgPage(lists, lists.id.toString());
|
listsLg?.pushMsgPage(
|
||||||
|
lists, lists.id.toString());
|
||||||
},
|
},
|
||||||
child: ClipOval(
|
child: ClipOval(
|
||||||
child: Image.network(
|
child: Image.network(
|
||||||
lists.user!.avatar!,
|
lists.user!.avatar!,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -228,10 +245,11 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
Container(
|
Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 18.sp,
|
height: 18.sp,
|
||||||
padding:
|
padding: EdgeInsets.only(
|
||||||
EdgeInsets.only(left: 6.sp, right: 6.sp),
|
left: 6.sp, right: 6.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(9.sp),
|
borderRadius:
|
||||||
|
BorderRadius.circular(9.sp),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
begin: Alignment(0.25, 0.5),
|
begin: Alignment(0.25, 0.5),
|
||||||
end: Alignment(0.75, 0.5),
|
end: Alignment(0.75, 0.5),
|
||||||
@ -239,15 +257,17 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
Color(0xff8DFFF8),
|
Color(0xff8DFFF8),
|
||||||
Color(0xffB5D3FF)
|
Color(0xffB5D3FF)
|
||||||
])),
|
])),
|
||||||
|
|
||||||
child: Text(
|
child: Text(
|
||||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
getAgeCOntent(
|
||||||
lists.user!.role!, lists.user!.orientation!),
|
lists.user!.gender!,
|
||||||
|
lists.user!.age!,
|
||||||
|
lists.user!.role!,
|
||||||
|
lists.user!.orientation!),
|
||||||
|
|
||||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
fontSize: 12.sp,
|
fontSize: 10.sp,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -315,22 +335,28 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
lists.create_time!,
|
lists.create_time!,
|
||||||
style:
|
style: TextStyle(
|
||||||
TextStyle(color: Colors.white, fontSize: 12.sp),
|
color: Colors.white, fontSize: 12.sp),
|
||||||
),
|
),
|
||||||
widget.userId.isNotEmpty
|
widget.userId.isNotEmpty
|
||||||
? Container()
|
? Container()
|
||||||
: GestureDetector(
|
: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showTipPiker(lists.id!.toString(), listsLg!.lists.indexOf(lists));
|
showTipPiker(lists.id!.toString(),
|
||||||
|
listsLg!.lists.indexOf(lists));
|
||||||
},
|
},
|
||||||
child: Image.asset(getCircleImage('delete'),width: 14.sp,))
|
child: Image.asset(
|
||||||
|
getCircleImage('delete'),
|
||||||
|
width: 14.sp,
|
||||||
|
))
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
]));
|
])),
|
||||||
|
],
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
///普通图文喊话
|
///普通图文喊话
|
||||||
@ -363,10 +389,22 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
|
|
||||||
double titleHeight = textWidth(lists.interest!['title']);
|
double titleHeight = textWidth(lists.interest!['title']);
|
||||||
|
|
||||||
return Container(
|
return Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 14.sp,bottom: 10.sp),
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(
|
||||||
|
lists.create_time.toString(),
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
height: picHeight > 0 ? 105.sp + contentHeight(lists.content!) + picHeight : 100.sp + contentHeight(lists.content!),
|
height: picHeight > 0
|
||||||
|
? 105.sp + contentHeight(lists.content!) + picHeight
|
||||||
|
: 100.sp + contentHeight(lists.content!),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
image: DecorationImage(
|
image: DecorationImage(
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.fill,
|
||||||
@ -422,7 +460,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
lists.user!.avatar!,
|
lists.user!.avatar!,
|
||||||
width: 40.sp,
|
width: 40.sp,
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
fit: BoxFit.fill,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
@ -474,8 +512,11 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
Color(0xffB5D3FF)
|
Color(0xffB5D3FF)
|
||||||
])),
|
])),
|
||||||
child: Text(
|
child: Text(
|
||||||
getAgeCOntent(lists.user!.gender!, lists.user!.age!,
|
getAgeCOntent(
|
||||||
lists.user!.role!, lists.user!.orientation!),
|
lists.user!.gender!,
|
||||||
|
lists.user!.age!,
|
||||||
|
lists.user!.role!,
|
||||||
|
lists.user!.orientation!),
|
||||||
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
// '${genderList[lists.user!.gender!]}.${lists.user!.age}.${roleList[lists.user!.role!]}.${orientationList[lists.user!.orientation!]}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@ -562,9 +603,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
? Container()
|
? Container()
|
||||||
: GestureDetector(
|
: GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showTipPiker(lists.id!.toString(), listsLg!.lists.indexOf(lists));
|
showTipPiker(lists.id!.toString(),
|
||||||
|
listsLg!.lists.indexOf(lists));
|
||||||
},
|
},
|
||||||
child: Image.asset(getCircleImage('delete'),width: 14.sp,))
|
child: Image.asset(
|
||||||
|
getCircleImage('delete'),
|
||||||
|
width: 14.sp,
|
||||||
|
))
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
],
|
],
|
||||||
@ -572,6 +617,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,7 +655,8 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
locale: WidgetsBinding.instance!.window.locale,
|
locale: WidgetsBinding.instance!.window.locale,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
textScaleFactor: 1, //字体缩放大小
|
textScaleFactor: 1,
|
||||||
|
//字体缩放大小
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
text: value,
|
text: value,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -618,7 +666,7 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
return painter.width;
|
return painter.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
showTipPiker(String callOutId,int index) {
|
showTipPiker(String callOutId, int index) {
|
||||||
return Get.bottomSheet(
|
return Get.bottomSheet(
|
||||||
Scaffold(
|
Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
@ -632,10 +680,13 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
child: const Text("确定",style: TextStyle(color: Colors.red),),
|
child: const Text(
|
||||||
|
"确定",
|
||||||
|
style: TextStyle(color: Colors.red),
|
||||||
|
),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
listsLg?.removeData(callOutId,index);
|
listsLg?.removeData(callOutId, index);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
CupertinoDialogAction(
|
CupertinoDialogAction(
|
||||||
@ -649,7 +700,6 @@ class _HomeCallOutViewState extends State<HomeCallOutView> {
|
|||||||
),
|
),
|
||||||
isScrollControlled: true,
|
isScrollControlled: true,
|
||||||
enableDrag: false,
|
enableDrag: false,
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,30 +108,29 @@ class VisitorlistPage extends StatelessWidget {
|
|||||||
// Placeholder image
|
// Placeholder image
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
SizedBox(height: 8.sp),
|
SizedBox(height: 8.sp),
|
||||||
Container(
|
SizedBox(
|
||||||
width: 150.sp,
|
width: 200.sp,
|
||||||
child: Text(
|
child: Text(
|
||||||
item.user.signature,
|
item.user.signature,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFB7BECC)),
|
overflow: TextOverflow.ellipsis, // 超出部分使用省略号表示
|
||||||
|
maxLines: 1,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFFB7BECC)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Pla
|
// Pla
|
||||||
Spacer(),
|
const Spacer(),
|
||||||
GestureDetector(onTap: (){
|
GestureDetector(onTap: (){
|
||||||
pushChatPage(item.user.id.toString(),item.accountId, item.user.nickname);
|
pushChatPage(item.user.id.toString(),item.accountId, item.user.nickname);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 60.sp,
|
width: 60.sp,
|
||||||
height: 28.sp,
|
height: 28.sp,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFFF4D7C),
|
color: const Color(0xFFFF4D7C),
|
||||||
borderRadius: BorderRadius.circular(14),
|
borderRadius: BorderRadius.circular(14.sp),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text("私聊", style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
child: Text("私聊", style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
||||||
|
|||||||
@ -25,6 +25,12 @@ void main() {
|
|||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int IMsdkAppID = 1400799631;
|
||||||
|
|
||||||
|
String iOSAPPid = "";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//登录IM
|
//登录IM
|
||||||
loginIM(String userId,String sig) async {
|
loginIM(String userId,String sig) async {
|
||||||
@ -210,7 +216,7 @@ class _MyAppState extends State<MyApp> {
|
|||||||
initIM() {
|
initIM() {
|
||||||
coreInstance.init(
|
coreInstance.init(
|
||||||
sdkAppID:
|
sdkAppID:
|
||||||
1400799631, // Replace 0 with the SDKAppID of your IM application when integrating
|
IMsdkAppID, // Replace 0 with the SDKAppID of your IM application when integrating
|
||||||
// language: LanguageEnum.en, // 界面语言配置,若不配置,则跟随系统语言
|
// language: LanguageEnum.en, // 界面语言配置,若不配置,则跟随系统语言
|
||||||
loglevel: LogLevelEnum.V2TIM_LOG_DEBUG,
|
loglevel: LogLevelEnum.V2TIM_LOG_DEBUG,
|
||||||
onTUIKitCallbackListener: (TIMCallback callbackValue) {
|
onTUIKitCallbackListener: (TIMCallback callbackValue) {
|
||||||
|
|||||||
@ -60,6 +60,10 @@ class Api {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//版本信息
|
||||||
|
static const APP_VERSION = 'user-service/app/version';
|
||||||
|
|
||||||
//入圈出圈
|
//入圈出圈
|
||||||
static const outCrrcle = 'up-service/interest/';
|
static const outCrrcle = 'up-service/interest/';
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:circle_app/util/util.dart';
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
|
|
||||||
import '../util/device.dart';
|
import '../util/device.dart';
|
||||||
import 'api.dart';
|
import 'api.dart';
|
||||||
@ -347,3 +348,5 @@ class QnTokenData {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user