Compare commits
No commits in common. "d7679f5587cdef8afaada4673b14bacf0e15e931" and "0fd0d0af9c9c1deb2ce154fc604615b066d069cb" have entirely different histories.
d7679f5587
...
0fd0d0af9c
@ -43,10 +43,6 @@ android {
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
// ndk {
|
||||
// abiFilters 'armeabi-v7a','arm64-v8a'
|
||||
// ldLibs "log"
|
||||
// }
|
||||
debug {
|
||||
storeFile file('../leyuan.jks')
|
||||
storePassword 'leyuan'
|
||||
@ -76,10 +72,6 @@ android {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
project.ext.enableFlutterNullSafety = false
|
||||
}
|
||||
debug{
|
||||
project.ext.enableFlutterNullSafety = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 56 KiB |
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background"/>
|
||||
<background android:drawable="@drawable/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 8.3 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 27 KiB |
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#FFFFFF</color>
|
||||
</resources>
|
||||
@ -1,7 +1,9 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'state.dart';
|
||||
import 'package:package_info_plus/package_info_plus.dart';
|
||||
|
||||
@ -30,7 +30,7 @@ class AboutappPage extends StatelessWidget {
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: const MyAppBar(centerTitle: '关于圈子',),
|
||||
appBar: MyAppBar(centerTitle: '关于圈子',),
|
||||
body: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
// Replace with your desired color
|
||||
@ -41,16 +41,12 @@ class AboutappPage extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
||||
children: [
|
||||
GestureDetector(onTap: (){
|
||||
// showToast("13");
|
||||
},
|
||||
child:Image.asset(
|
||||
Image.asset(
|
||||
getBaseImage("icon_login"), // Replace with your image path
|
||||
width: 100.sp,
|
||||
height: 100.sp,
|
||||
fit: BoxFit.contain,
|
||||
) ,)
|
||||
,
|
||||
),
|
||||
SizedBox(height: 20.sp),
|
||||
Text(
|
||||
'圈子',
|
||||
@ -105,11 +101,11 @@ class AboutappPage extends StatelessWidget {
|
||||
Text(
|
||||
'用户协议',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_in")),
|
||||
width: 24.sp,
|
||||
@ -127,14 +123,14 @@ class AboutappPage extends StatelessWidget {
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'隐私政策',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_in")),
|
||||
width: 24.sp,
|
||||
@ -155,11 +151,11 @@ class AboutappPage extends StatelessWidget {
|
||||
Text(
|
||||
'版本更新',
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFF7FAFA),
|
||||
color: Color(0xFFF7FAFA),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 5.sp,
|
||||
@ -172,11 +168,11 @@ class AboutappPage extends StatelessWidget {
|
||||
Text(
|
||||
logic.version,
|
||||
style: TextStyle(
|
||||
color: const Color(0xFFB7BECC),
|
||||
color: Color(0xFFB7BECC),
|
||||
fontSize: 12.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8.sp),
|
||||
SizedBox(width: 8),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_in")),
|
||||
width: 24.sp,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import 'state.dart';
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../components/my_app_bar.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
|
||||
@ -5,19 +5,24 @@ import 'dart:typed_data';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_luban/flutter_luban.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:qiniu_flutter_sdk/qiniu_flutter_sdk.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:video_thumbnail/video_thumbnail.dart';
|
||||
|
||||
import '../../common/Widgets/open_vip_tip/view.dart';
|
||||
import '../../common/errorcode.dart';
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/qiniu.dart';
|
||||
import '../login/complete_material/logic.dart';
|
||||
import '../select_circle/logic.dart';
|
||||
import 'state.dart';
|
||||
import '../../common/config.dart';
|
||||
@ -126,7 +131,7 @@ class Call_outLogic extends GetxController {
|
||||
print(myBean.toString());
|
||||
var data = await DioManager.instance.post(url: Api.SendShout, params: {
|
||||
'album': myBean,
|
||||
'content': textEditingController.text.trim(),
|
||||
'content': textEditingController.text,
|
||||
'interest_id': numbers[0].id,
|
||||
'use_queen': isCheck ? 1 : 0,
|
||||
});
|
||||
|
||||
@ -294,8 +294,8 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
GestureDetector(
|
||||
behavior:HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
// showToast("点个鸡毛,星哥还没做");
|
||||
// Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
||||
showToast("点个鸡毛,星哥还没做");
|
||||
Get.toNamed(AppRoutes.FriendsActivity,arguments: '3');
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
@ -323,10 +323,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
SizedBox(
|
||||
width: 8.sp,
|
||||
),
|
||||
// Image.asset(
|
||||
// getCircleImage('play'),
|
||||
// width: 20.sp,
|
||||
// )
|
||||
Image.asset(
|
||||
getCircleImage('play'),
|
||||
width: 20.sp,
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
|
||||
@ -6,6 +6,7 @@ import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../../util/SharedPreferencesHelper.dart';
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
@ -20,11 +21,7 @@ class FriendslistLogic extends GetxController {
|
||||
super.onInit();
|
||||
initList();
|
||||
}
|
||||
void dispose() {
|
||||
refreshController.dispose();
|
||||
super.dispose();
|
||||
|
||||
}
|
||||
initList() async {
|
||||
if (page == 1) {
|
||||
lists.clear();
|
||||
|
||||
@ -51,12 +51,11 @@ class FriendslistPage extends StatelessWidget {
|
||||
|
||||
Widget ListItem(UserInfo item,int index) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
margin: const EdgeInsets.only(bottom: 21),
|
||||
margin: EdgeInsets.only(bottom: 21),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(children: [
|
||||
@ -108,7 +107,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
),
|
||||
|
||||
SizedBox(height: 8.sp),
|
||||
SizedBox(
|
||||
Container(
|
||||
width: 150.sp,
|
||||
child: Text(
|
||||
item.signature,
|
||||
@ -118,7 +117,7 @@ class FriendslistPage extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
// Pla
|
||||
const Spacer(),
|
||||
Spacer(),
|
||||
GestureDetector(onTap: (){
|
||||
|
||||
logic.setLike(index);
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
@ -8,11 +9,7 @@ import '../../util/util.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class LikelistLogic extends GetxController {
|
||||
void dispose() {
|
||||
refreshController.dispose();
|
||||
super.dispose();
|
||||
|
||||
}
|
||||
final RefreshController refreshController = RefreshController();
|
||||
final LikelistState state = LikelistState();
|
||||
|
||||
|
||||
@ -55,13 +55,12 @@ class LikelistPage extends StatelessWidget {
|
||||
|
||||
Widget ListItem(UserListItem item, int index) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.UserInfoActivity,
|
||||
arguments: item.user.id.toString());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(bottom: 21.sp),
|
||||
margin: EdgeInsets.only(bottom: 21),
|
||||
child: Row(
|
||||
children: [
|
||||
Stack(
|
||||
@ -83,10 +82,10 @@ class LikelistPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0.sp,
|
||||
left: 0.sp,
|
||||
bottom: 0.sp,
|
||||
child: item.user.vip!=0
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
child: item.isLike
|
||||
? Image(
|
||||
image: AssetImage(getBaseImage("vip")),
|
||||
width: 44.sp,
|
||||
@ -132,15 +131,15 @@ class LikelistPage extends StatelessWidget {
|
||||
logic.setLike(index);
|
||||
},
|
||||
child: Container(
|
||||
width: 75.sp,
|
||||
height: 28.sp,
|
||||
width: 75,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(item.isLike ? "互相关注" : "关注",
|
||||
style: TextStyle(fontSize: 14.sp, color: Colors.white)),
|
||||
style: TextStyle(fontSize: 14, color: Colors.white)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -160,7 +159,7 @@ class LikelistPage extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.sp),
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
@ -176,7 +175,7 @@ class LikelistPage extends StatelessWidget {
|
||||
ageMsg,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10.sp,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -9,6 +9,7 @@ import 'package:image_picker/image_picker.dart';
|
||||
|
||||
import '../../../common/config.dart';
|
||||
import '../../../network/api.dart';
|
||||
import '../../../util/device.dart';
|
||||
import '../../../util/qiniu.dart';
|
||||
import '../../minefragment/logic.dart';
|
||||
import '../../select_circle/logic.dart';
|
||||
@ -167,8 +168,8 @@ class Complete_materialLogic extends GetxController {
|
||||
'orientation': state.orientationId, //Int 爱好
|
||||
// 'lat': location.latitude,
|
||||
// 'lng': location.longitude,
|
||||
'nickname': state.textEditingController.text.trim(),
|
||||
'signature': state.descEditingController.text.trim(),
|
||||
'nickname': state.textEditingController.text,
|
||||
'signature': state.descEditingController.text,
|
||||
});
|
||||
var bean = BaseResponse<String>.fromJson(data, (data) => data);
|
||||
if (bean.code == 200) {
|
||||
|
||||
@ -6,28 +6,12 @@ import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../../network/api.dart';
|
||||
import '../../../util/SharedPreferencesHelper.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class LoginLogic extends GetxController {
|
||||
@override
|
||||
void onInit() async{
|
||||
// TODO: implement onInit
|
||||
super.onInit();
|
||||
SharedPreferences sharedPreferences =await SharedPreferences.getInstance();
|
||||
String loginPhone = await sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE)??"";
|
||||
print(loginPhone);
|
||||
phoneEditingController.text = loginPhone;
|
||||
if (GetUtils.isPhoneNumber(loginPhone)&& loginPhone.length==11) {
|
||||
isPhoto = true;
|
||||
}
|
||||
update();
|
||||
|
||||
}
|
||||
bool isPhoto = false;
|
||||
final LoginState state = LoginState();
|
||||
TextEditingController phoneEditingController = TextEditingController();
|
||||
TextEditingController codeEditingController = TextEditingController();
|
||||
@ -40,21 +24,8 @@ class LoginLogic extends GetxController {
|
||||
starDownTimer() {
|
||||
if (sendCodeBtn == false && seconds == 60) {
|
||||
getCode();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getCode() async {
|
||||
var data = await DioManager.instance.post(url: Api.sendCode, params: {"phone": phoneEditingController.text});
|
||||
var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data));
|
||||
showToast(bean.msg);
|
||||
if(bean.code==200){
|
||||
if(kDebugMode){
|
||||
codeEditingController.text = bean.data!.code.toString();
|
||||
update();
|
||||
}
|
||||
sendCodeBtn = true;
|
||||
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
||||
t = Timer.periodic(Duration(milliseconds: 1000), (timer) {
|
||||
seconds--;
|
||||
if (seconds == 0) {
|
||||
t?.cancel(); //清除
|
||||
@ -64,7 +35,18 @@ class LoginLogic extends GetxController {
|
||||
update();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getCode() async {
|
||||
var data = await DioManager.instance.post(url: Api.sendCode, params: {"phone": phoneEditingController.text});
|
||||
var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data));
|
||||
showToast(bean.msg);
|
||||
if(kDebugMode){
|
||||
if(bean.code==200){
|
||||
codeEditingController.text = bean.data!.code.toString();
|
||||
update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
@ -87,7 +69,6 @@ class LoginLogic extends GetxController {
|
||||
var bean = BaseResponse<LoginData>.fromJson(data, (data) => LoginData.fromJson(data));
|
||||
if (bean.code == 200) {
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setString(SharedPreferencesHelper.LOGINPHONE, phoneEditingController.text);
|
||||
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,bean.data!.Authorization.toString());
|
||||
});
|
||||
|
||||
@ -97,7 +78,6 @@ class LoginLogic extends GetxController {
|
||||
return;
|
||||
} else if (bean.code == 30002) {
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
sharedPreferences.setString(SharedPreferencesHelper.LOGINPHONE, phoneEditingController.text);
|
||||
sharedPreferences.setString(SharedPreferencesHelper.AUTHORIZATION,bean.data!.Authorization.toString());
|
||||
});
|
||||
|
||||
|
||||
@ -1,5 +1,3 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@ -15,7 +13,7 @@ class LoginPage extends StatelessWidget {
|
||||
final state = Get
|
||||
.find<LoginLogic>()
|
||||
.state;
|
||||
|
||||
bool isPhoto = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -59,9 +57,9 @@ class LoginPage extends StatelessWidget {
|
||||
child: TextField(
|
||||
onChanged: (msg){
|
||||
if (GetUtils.isPhoneNumber(msg)&& msg.length==11) {
|
||||
logic.isPhoto = true;
|
||||
isPhoto = true;
|
||||
}else{
|
||||
logic.isPhoto = false;
|
||||
isPhoto = false;
|
||||
}
|
||||
logic.update();
|
||||
},
|
||||
@ -131,7 +129,7 @@ class LoginPage extends StatelessWidget {
|
||||
right: 0,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
if(logic.isPhoto){
|
||||
if(isPhoto){
|
||||
logic.starDownTimer();
|
||||
}
|
||||
},
|
||||
@ -140,7 +138,7 @@ class LoginPage extends StatelessWidget {
|
||||
width: 76.sp,
|
||||
height: 29.sp,
|
||||
decoration: BoxDecoration(
|
||||
color:logic.isPhoto ? Color(0xFF21BEAB) : Colors.white30,
|
||||
color:isPhoto ? Color(0xFF21BEAB) : Colors.white30,
|
||||
borderRadius: BorderRadius.circular(
|
||||
29.sp / 2)
|
||||
),
|
||||
|
||||
@ -5,6 +5,7 @@ import '../../network/dio_manager.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/util.dart';
|
||||
import '../userinfo/logic.dart';
|
||||
import 'state.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
@ -25,9 +26,8 @@ class MinefragmentPage extends StatelessWidget {
|
||||
.padding
|
||||
.top;
|
||||
|
||||
return GetBuilder<MinefragmentLogic>(
|
||||
builder: (logic) {
|
||||
return Scaffold(
|
||||
return GetBuilder<MinefragmentLogic>(builder: (logic) {
|
||||
return Scaffold(
|
||||
body: Container(
|
||||
width: Get.width,
|
||||
height: Get.height,
|
||||
@ -63,8 +63,10 @@ class MinefragmentPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _CircleLiveView(MinefragmentLogic logic) {
|
||||
return Column(
|
||||
children: [_CircleItemView(logic), _HelpItemView(), _SetUpItemView()],
|
||||
return Container(
|
||||
child: Column(
|
||||
children: [_CircleItemView(logic), _HelpItemView(), _SetUpItemView()],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@ -89,7 +91,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
height: 24.sp,
|
||||
),
|
||||
SizedBox(width: 10.sp),
|
||||
const Text(
|
||||
Text(
|
||||
"设置",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -130,7 +132,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
height: 24.sp,
|
||||
),
|
||||
SizedBox(width: 10.sp),
|
||||
const Text(
|
||||
Text(
|
||||
"帮助与反馈",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -170,7 +172,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
height: 24.sp,
|
||||
),
|
||||
SizedBox(width: 10.sp),
|
||||
const Text(
|
||||
Text(
|
||||
"我的圈子",
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
@ -180,7 +182,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
logic.JoinedCircle,
|
||||
style: const TextStyle(color: Colors.white30),
|
||||
style: TextStyle(color: Colors.white30),
|
||||
),
|
||||
Image(
|
||||
image: AssetImage(getHomeImage("icon_in")),
|
||||
@ -209,32 +211,34 @@ class MinefragmentPage extends StatelessWidget {
|
||||
onTap: () {
|
||||
Get.toNamed(AppRoutes.FriendsActivity);
|
||||
},
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
logic.like_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.sp),
|
||||
Text(
|
||||
"我喜欢的",
|
||||
style: TextStyle(
|
||||
shadows: const [
|
||||
Shadow(
|
||||
color: Color(0x99FF00F8),
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
],
|
||||
color: const Color.fromARGB(255, 247, 250, 250),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
logic.like_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 4.sp),
|
||||
Text(
|
||||
"我喜欢的",
|
||||
style: TextStyle(
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0x99FF00F8),
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
],
|
||||
color: Color.fromARGB(255, 247, 250, 250),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
@ -256,11 +260,13 @@ class MinefragmentPage extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
logic.like_me_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
Container(
|
||||
child: Text(
|
||||
logic.like_me_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@ -272,14 +278,14 @@ class MinefragmentPage extends StatelessWidget {
|
||||
Text(
|
||||
"喜欢我的",
|
||||
style: TextStyle(
|
||||
shadows: const [
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0x99FF00F8),
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
],
|
||||
color: const Color.fromARGB(255, 247, 250, 250),
|
||||
color: Color.fromARGB(255, 247, 250, 250),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
@ -289,8 +295,8 @@ class MinefragmentPage extends StatelessWidget {
|
||||
right: 0.sp,
|
||||
top: 15.sp,
|
||||
child: Text(
|
||||
logic.like_me_count_new>0 ? "+${logic.like_me_count_new}":"",
|
||||
style: const TextStyle(color: Color.fromRGBO(0, 255, 210, 1.0)),
|
||||
logic.like_me_count_new>0 ? "+"+logic.like_me_count_new.toString():"",
|
||||
style: TextStyle(color: Color.fromRGBO(0, 255, 210, 1.0)),
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -314,30 +320,32 @@ class MinefragmentPage extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
logic.recent_visit_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
Container(
|
||||
child: Text(
|
||||
logic.recent_visit_count.toString(),
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
Container(
|
||||
height: 4.sp,
|
||||
width: 80.sp,
|
||||
),
|
||||
Text(
|
||||
"最近来访",
|
||||
style: TextStyle(
|
||||
shadows: const [
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Color(0x99FF00F8),
|
||||
offset: Offset(2, 2),
|
||||
blurRadius: 3,
|
||||
),
|
||||
],
|
||||
color: const Color.fromARGB(255, 247, 250, 250),
|
||||
color: Color.fromARGB(255, 247, 250, 250),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
@ -347,8 +355,8 @@ class MinefragmentPage extends StatelessWidget {
|
||||
right: 0.sp,
|
||||
top: 15.sp,
|
||||
child: Text(
|
||||
logic.recent_visit_count_new>0 ? "+${logic.recent_visit_count_new}":"",
|
||||
style: const TextStyle(color: Color.fromRGBO(0, 255, 210, 1.0)),
|
||||
logic.recent_visit_count_new>0 ? "+"+logic.recent_visit_count_new.toString():"",
|
||||
style: TextStyle(color: Color.fromRGBO(0, 255, 210, 1.0)),
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -367,7 +375,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
await Get.toNamed(AppRoutes.UserInfoActivity, arguments: "");
|
||||
logic.onInit();
|
||||
},
|
||||
child: SizedBox(
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
height: 65.sp,
|
||||
child: Row(
|
||||
@ -432,7 +440,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
},
|
||||
child:logic.userInfoBean==null ? SizedBox(
|
||||
child:logic.userInfoBean==null ? Container(
|
||||
width: 63.sp,
|
||||
height: 63.sp,
|
||||
): CachedNetworkImage(
|
||||
@ -456,7 +464,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
Text(
|
||||
logic.name,
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
@ -465,7 +473,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
Text(
|
||||
logic.enterHomeInfoMsg,
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
@ -487,7 +495,7 @@ class MinefragmentPage extends StatelessWidget {
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: const LinearGradient(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
Color.fromRGBO(181, 211, 255, 1.0),
|
||||
|
||||
@ -56,9 +56,9 @@ class MyfeedbacklistPage extends StatelessWidget {
|
||||
fontSize: 14.0.sp,
|
||||
),),
|
||||
Container(
|
||||
margin: EdgeInsets.only(bottom: 12.0.sp,top: 12.sp),
|
||||
margin: EdgeInsets.only(bottom: 12.0,top: 12.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.0.sp),
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
color: Color(0xff282733),
|
||||
),
|
||||
child: Column(
|
||||
|
||||
@ -256,8 +256,8 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black.withOpacity(0.6),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(20.sp),
|
||||
topRight: Radius.circular(20.sp),
|
||||
topLeft: Radius.circular(20),
|
||||
topRight: Radius.circular(20),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
@ -300,7 +300,7 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
child: Container(
|
||||
width: Get.width,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 16.sp),
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
@ -314,9 +314,9 @@ class _OffaccountState extends State<OffaccountPage> {
|
||||
|
||||
Widget buildDivider() {
|
||||
return Container(
|
||||
height: 0.5.sp,
|
||||
color: const Color(0xff2E2E3B),
|
||||
margin: EdgeInsets.symmetric(horizontal: 16.sp),
|
||||
height: 0.5,
|
||||
color: Color(0xff2E2E3B),
|
||||
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -43,12 +43,12 @@ class ReportPage extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 16.sp, top: 16.sp),
|
||||
padding: EdgeInsets.only(left: 16, top: 16),
|
||||
child: Text(
|
||||
'举报类目',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -65,10 +65,10 @@ class ReportPage extends StatelessWidget {
|
||||
'详细截图(请至少上传一张图片,帮助审核处理)',
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16.sp,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20.sp),
|
||||
SizedBox(height: 20),
|
||||
// 添加 RecyclerView(ListView) 的内容
|
||||
// 例如: MyRecyclerViewWidget(),
|
||||
Container(
|
||||
@ -78,13 +78,13 @@ class ReportPage extends StatelessWidget {
|
||||
'补充说明',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp,
|
||||
fontSize: 14,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
Container(
|
||||
// margin: EdgeInsets.only(left: 10, right: 10),
|
||||
height: 200.sp,
|
||||
height: 200,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF4C3E5F),
|
||||
|
||||
@ -3,6 +3,7 @@ import 'package:get/get.dart';
|
||||
import '../../router/app_routers.dart';
|
||||
import '../../util/SharedPreferencesHelper.dart';
|
||||
import 'state.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:circle_app/app/circle/logic.dart';
|
||||
import 'package:circle_app/app/circle/state.dart';
|
||||
import 'package:circle_app/app/circle/widgets/list_logic.dart';
|
||||
import 'package:circle_app/app/circle/widgets/video_item.dart';
|
||||
import 'package:circle_app/app/userinfo/widgets/home_call_out_logic.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
|
||||
@ -1,18 +1,14 @@
|
||||
import 'dart:ffi';
|
||||
|
||||
import 'package:get/get.dart';
|
||||
import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||
|
||||
import '../../network/api.dart';
|
||||
import '../../network/dio_manager.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'state.dart';
|
||||
|
||||
class VisitorlistLogic extends GetxController {
|
||||
@override
|
||||
void dispose() {
|
||||
refreshController.dispose();
|
||||
super.dispose();
|
||||
|
||||
}
|
||||
|
||||
final RefreshController refreshController = RefreshController();
|
||||
final VisitorlistState state = VisitorlistState();
|
||||
|
||||
@ -52,7 +52,6 @@ class VisitorlistPage extends StatelessWidget {
|
||||
|
||||
Widget ListItem(UserListItem item,int index) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: (){
|
||||
Get.toNamed(AppRoutes.UserInfoActivity, arguments: item.user.id.toString());
|
||||
},
|
||||
@ -80,9 +79,9 @@ class VisitorlistPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 0.sp,
|
||||
left: 0.sp,
|
||||
bottom: 0.sp,
|
||||
right: 0,
|
||||
left: 0,
|
||||
bottom: 0,
|
||||
|
||||
child: item.user.vip!=0 ?
|
||||
Image(
|
||||
@ -126,8 +125,8 @@ class VisitorlistPage extends StatelessWidget {
|
||||
|
||||
},
|
||||
child: Container(
|
||||
width: 60.sp,
|
||||
height: 28.sp,
|
||||
width: 60,
|
||||
height: 28,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFF4D7C),
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
@ -152,7 +151,7 @@ class VisitorlistPage extends StatelessWidget {
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(17.sp),
|
||||
borderRadius: BorderRadius.circular(17),
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color.fromRGBO(141, 255, 248, 1.0),
|
||||
@ -168,7 +167,7 @@ class VisitorlistPage extends StatelessWidget {
|
||||
ageMsg ,
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 10.sp,
|
||||
fontSize: 10,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:circle_app/app/home/binding.dart';
|
||||
import 'package:circle_app/app/home/view.dart';
|
||||
import 'package:circle_app/app/splash/binding.dart';
|
||||
import 'package:circle_app/router/app_pages.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
|
||||
@ -6,7 +6,6 @@ import 'package:dio/dio.dart';
|
||||
|
||||
import '../util/device.dart';
|
||||
import 'api.dart';
|
||||
import 'package:connectivity/connectivity.dart';
|
||||
|
||||
const String baseUrl = Api.baseUrl;
|
||||
|
||||
@ -44,7 +43,6 @@ class DioManager {
|
||||
receiveTimeout: Duration(seconds: 30000000000),
|
||||
));
|
||||
_dio!.interceptors.add(LogInterceptor(responseBody: true));
|
||||
// _dio!.interceptors.add(ConnectivityInterceptor());
|
||||
}
|
||||
|
||||
Future download(String urlPath,String savePath,ProgressCallback progressCallback)async{
|
||||
@ -155,13 +153,6 @@ class DioManager {
|
||||
DioMethod.delete: 'delete',
|
||||
DioMethod.put: 'put'
|
||||
};
|
||||
var connectivityResult = await Connectivity().checkConnectivity();
|
||||
|
||||
if(connectivityResult == ConnectivityResult.none){
|
||||
// showToast("");
|
||||
return {'code': 404, 'msg': '请检查网络连接是否正常'};
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
Response response;
|
||||
@ -317,22 +308,6 @@ class BaseResponse<T> {
|
||||
|
||||
|
||||
}
|
||||
class ConnectivityInterceptor extends Interceptor {
|
||||
@override
|
||||
Future<void> onRequest(
|
||||
RequestOptions options, RequestInterceptorHandler handler) async {
|
||||
if (!await isInternetAvailable()) {
|
||||
showToast("请检查网络连接是否正常");
|
||||
}
|
||||
return handler.next(options);
|
||||
}
|
||||
|
||||
Future<bool> isInternetAvailable() async {
|
||||
var connectivityResult = await Connectivity().checkConnectivity();
|
||||
return connectivityResult != ConnectivityResult.none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class QnTokenData {
|
||||
final String token;
|
||||
|
||||
@ -11,9 +11,6 @@ class SharedPreferencesHelper {
|
||||
static const AVATAR = 'avatar';
|
||||
static const NAME = 'name';
|
||||
|
||||
static const LOGINPHONE = 'loginPhone';
|
||||
|
||||
|
||||
static SharedPreferencesHelper? _instance;
|
||||
static SharedPreferences? _preferences;
|
||||
|
||||
@ -68,5 +65,4 @@ class SharedPreferencesHelper {
|
||||
final prefs = preferences;
|
||||
prefs?.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,12 +10,15 @@ import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:video_compress/video_compress.dart';
|
||||
|
||||
import 'SharedPreferencesHelper.dart';
|
||||
|
||||
class Util {}
|
||||
class Util {
|
||||
|
||||
}
|
||||
//获取图片
|
||||
String getBaseImage(String image) {
|
||||
return '${Values.base_images}${image}.png';
|
||||
@ -49,6 +52,8 @@ String getCircleImage(String image) {
|
||||
return '${Values.circle_images}${image}.png';
|
||||
}
|
||||
|
||||
|
||||
|
||||
///弹窗文本提示 msg: 提示内容
|
||||
showToast(String msg) {
|
||||
Fluttertoast.showToast(
|
||||
@ -58,23 +63,17 @@ showToast(String msg) {
|
||||
timeInSecForIosWeb: 1,
|
||||
backgroundColor: Colors.black54,
|
||||
textColor: Colors.white,
|
||||
fontSize: 16.0);
|
||||
fontSize: 16.0
|
||||
);
|
||||
}
|
||||
|
||||
loaddingWidget(bool isMore) {
|
||||
return Container(
|
||||
alignment: Alignment.center,
|
||||
child: isMore
|
||||
? const CircularProgressIndicator(
|
||||
color: Color(0xFF07FAFB),
|
||||
)
|
||||
: Container(
|
||||
margin: EdgeInsets.only(top: 4.sp, bottom: 4.sp),
|
||||
child: Text(
|
||||
'--到底了--',
|
||||
style: TextStyle(color: Colors.white, fontSize: 13.sp),
|
||||
),
|
||||
),
|
||||
child: isMore ? const CircularProgressIndicator(color: Color(0xFF07FAFB),) : Container(
|
||||
margin:EdgeInsets.only(top: 4.sp,bottom: 4.sp),
|
||||
child: Text('--到底了--',style: TextStyle(color: Colors.white,fontSize: 13.sp),
|
||||
),),
|
||||
);
|
||||
}
|
||||
|
||||
@ -84,17 +83,9 @@ noResultWidget() {
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
getBaseImage('no_result'),
|
||||
width: 200.sp,
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
Text(
|
||||
'正在等待被填充~',
|
||||
style: TextStyle(color: Color(0xffdbdbdb), fontSize: 15.sp),
|
||||
),
|
||||
Image.asset(getBaseImage('no_result'),width: 200.sp,),
|
||||
SizedBox(height: 8.sp,),
|
||||
Text('正在等待被填充~',style: TextStyle(color: Color(0xffdbdbdb),fontSize: 15.sp),),
|
||||
],
|
||||
),
|
||||
);
|
||||
@ -106,12 +97,11 @@ double calculateTextHeight(String value, fontSize, FontWeight fontWeight,
|
||||
value = filterText(value);
|
||||
TextPainter painter = TextPainter(
|
||||
|
||||
///AUTO:华为手机如果不指定locale的时候,该方法算出来的文字高度是比系统计算偏小的。
|
||||
///AUTO:华为手机如果不指定locale的时候,该方法算出来的文字高度是比系统计算偏小的。
|
||||
locale: WidgetsBinding.instance!.window.locale,
|
||||
maxLines: maxLines,
|
||||
textDirection: TextDirection.ltr,
|
||||
textScaleFactor: 1,
|
||||
//字体缩放大小
|
||||
textScaleFactor: 1, //字体缩放大小
|
||||
text: TextSpan(
|
||||
text: value,
|
||||
style: TextStyle(
|
||||
@ -133,6 +123,7 @@ String filterText(String text) {
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
String convertToTenThousand(int number) {
|
||||
if (number >= 10000) {
|
||||
double result = number / 10000;
|
||||
@ -141,19 +132,15 @@ String convertToTenThousand(int number) {
|
||||
return number.toString();
|
||||
}
|
||||
}
|
||||
|
||||
pushLoginPage() async {
|
||||
pushLoginPage() async{
|
||||
logoutIM();
|
||||
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
|
||||
String loginPhone = sharedPreferences.getString(SharedPreferencesHelper.LOGINPHONE);
|
||||
print(loginPhone);
|
||||
sharedPreferences.clear();
|
||||
sharedPreferences.setString(SharedPreferencesHelper.LOGINPHONE, loginPhone);
|
||||
});
|
||||
|
||||
|
||||
Get.offAllNamed(AppRoutes.Login);
|
||||
}
|
||||
|
||||
String filterSensitiveWords(String input, List<String> sensitiveWords) {
|
||||
String filteredString = input;
|
||||
for (String word in sensitiveWords) {
|
||||
@ -163,8 +150,9 @@ String filterSensitiveWords(String input, List<String> sensitiveWords) {
|
||||
return filteredString;
|
||||
}
|
||||
|
||||
String getAgeCOntent(int gender, int age, int role, int orientation) {
|
||||
return "${getGenderContent(gender)}.${age}.${getRoleContent(role)}.${getOrientationContent(orientation)}";
|
||||
String getAgeCOntent (int gender,int age,int role,int orientation){
|
||||
return "${getGenderContent(gender)}.${age}.${getRoleContent(role)}.${getOrientationContent(orientation)}";
|
||||
|
||||
}
|
||||
|
||||
String getGenderContent(int number) {
|
||||
@ -185,7 +173,6 @@ String getGenderContent(int number) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
String getOrientationContent(int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
@ -206,7 +193,6 @@ String getOrientationContent(int number) {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
String getRoleContent(int number) {
|
||||
switch (number) {
|
||||
case 1:
|
||||
@ -226,15 +212,14 @@ String getRoleContent(int number) {
|
||||
|
||||
typedef void MyCallback(String path);
|
||||
|
||||
Future<void> compressVideo(
|
||||
String inputPath, String outputPath, MyCallback myCallback) async {
|
||||
Future<void> compressVideo(String inputPath, String outputPath,MyCallback myCallback) async {
|
||||
final info = await VideoCompress.compressVideo(
|
||||
inputPath,
|
||||
quality: VideoQuality.MediumQuality,
|
||||
deleteOrigin: false,
|
||||
);
|
||||
|
||||
if (info != null && null != info.path) {
|
||||
if (info != null&&null!=info.path) {
|
||||
print(info.path);
|
||||
myCallback(info.path!);
|
||||
} else {
|
||||
@ -242,6 +227,7 @@ Future<void> compressVideo(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 获取应用程序的文档目录路径
|
||||
Future<String> getApplicationDocumentsDirectoryPath() async {
|
||||
final directory = await getApplicationDocumentsDirectory();
|
||||
@ -265,21 +251,14 @@ Future<String> getLibraryDirectoryPath() async {
|
||||
final directory = await getLibraryDirectory();
|
||||
return directory.path;
|
||||
}
|
||||
|
||||
//跳转到用户协议
|
||||
navigateToUserAgreement() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "用户协议",
|
||||
"url": "https://docs.qq.com/doc/DZVV1SkttZGlPUW1H"
|
||||
});
|
||||
navigateToUserAgreement(){
|
||||
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"用户协议","url":"https://docs.qq.com/doc/DZVV1SkttZGlPUW1H"});
|
||||
}
|
||||
|
||||
//跳转到隐私政策
|
||||
navigateToPrivacyPolicy() {
|
||||
Get.toNamed(AppRoutes.WebViewActivity, arguments: {
|
||||
'title': "隐私协议",
|
||||
"url": "https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1"
|
||||
});
|
||||
navigateToPrivacyPolicy(){
|
||||
Get.toNamed(AppRoutes.WebViewActivity,arguments: {'title':"隐私协议","url":"https://docs.qq.com/doc/DZXhvcXV6b1RNTUx1"});
|
||||
}
|
||||
|
||||
//发布内容规范
|
||||
|
||||
@ -86,9 +86,6 @@ dependencies:
|
||||
cached_network_image: ^3.2.3
|
||||
#安装apk
|
||||
flutter_install_app: 1.3.0
|
||||
#网络拦截
|
||||
connectivity: ^3.0.6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||