界面优化,增加十几种特权图片
This commit is contained in:
parent
a542c979a8
commit
a417a5cc69
BIN
circle_app/assets/images/home/icon_vip_more.png
Normal file
BIN
circle_app/assets/images/home/icon_vip_more.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 587 KiB |
@ -771,7 +771,7 @@ class _CirclePageState extends State<CirclePage>
|
||||
},
|
||||
child: Image.asset(
|
||||
getCircleImage('icon_screen'),
|
||||
width: 24.sp,
|
||||
width: 30.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -310,6 +310,7 @@ class _DiscoverState extends State<Discover>
|
||||
child: Swiper(
|
||||
autoplay:
|
||||
user.images!.length == 1 ? false : true,
|
||||
loop: user.images!.length == 1 ? false : true,
|
||||
itemBuilder:
|
||||
(BuildContext context, int index) {
|
||||
// print(index);
|
||||
@ -363,7 +364,34 @@ class _DiscoverState extends State<Discover>
|
||||
"你们都来过${user.both_cities!.first}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
),
|
||||
if (user.both_interests!.isNotEmpty)
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 6.sp,
|
||||
height: 6.sp,
|
||||
margin:
|
||||
EdgeInsets.only(right: 4.sp),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.circular(3.sp),
|
||||
color: const Color(0xFFCE51FF),
|
||||
),
|
||||
),
|
||||
// if (logic.online)
|
||||
Text(
|
||||
"你们有共同的圈子:${user.both_interests!.first['title']}",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -390,7 +418,7 @@ class _DiscoverState extends State<Discover>
|
||||
onLineStr,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 14.sp),
|
||||
fontSize: 16.sp),
|
||||
),
|
||||
],
|
||||
),
|
||||
@ -409,7 +437,7 @@ class _DiscoverState extends State<Discover>
|
||||
width: 73.sp,
|
||||
height: 25.sp,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainLinearGradient,
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius:
|
||||
BorderRadius.circular(12.5.sp)),
|
||||
child: Row(
|
||||
@ -544,11 +572,11 @@ class _DiscoverState extends State<Discover>
|
||||
getCircleImage(
|
||||
'chat_icon',
|
||||
),
|
||||
width: 40.sp,
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.sp,
|
||||
height: 25.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -565,11 +593,11 @@ class _DiscoverState extends State<Discover>
|
||||
? 'like_icon'
|
||||
: 'nor_like_icon',
|
||||
),
|
||||
width: 40.sp,
|
||||
width: 50.sp,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 8.sp,
|
||||
height: 20.sp,
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@ -580,7 +608,7 @@ class _DiscoverState extends State<Discover>
|
||||
getCircleImage(
|
||||
'no_look_icon',
|
||||
),
|
||||
width: 40.sp,
|
||||
width: 50.sp,
|
||||
),
|
||||
)
|
||||
],
|
||||
@ -911,6 +939,7 @@ class Users {
|
||||
int? vip;
|
||||
String? wxNum;
|
||||
List? both_cities;
|
||||
List? both_interests;
|
||||
|
||||
Users(
|
||||
{this.age,
|
||||
@ -920,6 +949,7 @@ class Users {
|
||||
this.birthday,
|
||||
this.blacklist,
|
||||
this.city,
|
||||
this.both_interests,
|
||||
this.distance,
|
||||
this.dust,
|
||||
this.email,
|
||||
@ -970,6 +1000,7 @@ class Users {
|
||||
vip = json['vip'];
|
||||
role = json['role'];
|
||||
auth = json['auth'];
|
||||
both_interests = json['both_interests'] ?? [];
|
||||
both_cities = json['both_cities'] ?? [];
|
||||
is_follow = json['is_follow'];
|
||||
interests = json['interests'];
|
||||
|
||||
@ -46,6 +46,9 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// TODO: add widget build method
|
||||
if (widget.logic.myVip == 0) {
|
||||
_scrollController.jumpTo(_scrollController.offset - 150.sp);
|
||||
}
|
||||
return widget.logic.vicinityList.isNotEmpty ? Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
@ -56,6 +59,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
enablePullUp: true,
|
||||
child: ListView.builder(
|
||||
controller: _scrollController,
|
||||
physics: widget.logic.myVip ==0 ? NeverScrollableScrollPhysics() : BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(10.sp),
|
||||
itemCount: widget.logic.vicinityList.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
@ -148,7 +152,7 @@ class _VicinityState extends State<Vicinity> with AutomaticKeepAliveClientMixin
|
||||
return Container(
|
||||
width: Get.width,
|
||||
// margin: EdgeInsets.only(top: 10.sp),
|
||||
color: const Color(0xB30B011B),
|
||||
color: Colors.black87,
|
||||
padding: EdgeInsets.symmetric(vertical: 14.sp, horizontal: 20.sp),
|
||||
child: Column(
|
||||
children: [
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
import 'package:circle_app/network/dio_manager.dart';
|
||||
import 'package:circle_app/router/app_routers.dart';
|
||||
import 'package:circle_app/util/util.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||
import 'package:flutter_pickers/time_picker/model/pduration.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
@ -126,6 +127,12 @@ class Complete_materialLogic extends GetxController {
|
||||
} catch (e) {
|
||||
SmartDialog.dismiss();
|
||||
print(e);
|
||||
|
||||
PlatformException? exception = e as PlatformException?;
|
||||
// invalid_image
|
||||
if(exception!.code == 'invalid_image') {
|
||||
showOKToast('不支持的图片格式,请另外选择图片');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return GetBuilder(builder: (Complete_materialLogic controller) {
|
||||
return Stack(
|
||||
children: [
|
||||
@ -41,22 +40,18 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
),
|
||||
),
|
||||
Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: MyAppBar(
|
||||
|
||||
centerTitle: '完善您的个人形象',
|
||||
isBack: true,
|
||||
isDiyBack: true,
|
||||
backPressed: () async {
|
||||
final isBack = await Navigator.maybePop(context);
|
||||
if (isBack) {
|
||||
|
||||
} else {
|
||||
Get.offNamed(AppRoutes.Login);
|
||||
}
|
||||
|
||||
}
|
||||
),
|
||||
// resizeToAvoidBottomInset: false,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: '完善您的个人形象',
|
||||
isBack: true,
|
||||
isDiyBack: true,
|
||||
backPressed: () async {
|
||||
final isBack = await Navigator.maybePop(context);
|
||||
if (isBack) {
|
||||
} else {
|
||||
Get.offNamed(AppRoutes.Login);
|
||||
}
|
||||
}),
|
||||
backgroundColor: Colors.transparent,
|
||||
body: GestureDetector(
|
||||
onTap: () {
|
||||
@ -135,7 +130,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
decoration: InputDecoration(
|
||||
counterText:'',
|
||||
counterText: '',
|
||||
hintText: '请输入微信号',
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
@ -144,9 +139,8 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
() {},
|
||||
() {},
|
||||
img: 'edit'),
|
||||
|
||||
funcWidget(
|
||||
'属性',
|
||||
Text(
|
||||
@ -159,7 +153,7 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
showSexPiker(context, controller);
|
||||
}),
|
||||
funcWidget(
|
||||
'生日',
|
||||
'年龄',
|
||||
Text(
|
||||
controller.state.age,
|
||||
style: TextStyle(
|
||||
@ -225,31 +219,51 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
width: Get.width - 50.sp,
|
||||
child: Stack(
|
||||
children: [
|
||||
Image.asset(getLoginImage('desc_bg'),width: Get.width - 50.sp,fit: BoxFit.fill,),
|
||||
TextField(
|
||||
maxLines: 4,
|
||||
controller:
|
||||
controller.state.descEditingController,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入您的交友宣言',
|
||||
// icon: Text('交友宣言:',style: TextStyle(color: Colors.white,fontSize: 14.sp,fontWeight: FontWeight.w500),),
|
||||
labelText: '您的交友宣言',
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 16.sp),
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.all(20.sp)),
|
||||
inputFormatters: [LengthLimitingTextInputFormatter(40)],
|
||||
)
|
||||
Image.asset(
|
||||
getLoginImage('desc_bg'),
|
||||
width: Get.width - 50.sp,
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
Container(
|
||||
margin:
|
||||
EdgeInsets.only(left: 15.sp, top: 15.sp,right: 10.sp),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'交友宣言',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
TextField(
|
||||
maxLines: 3,
|
||||
controller: controller
|
||||
.state.descEditingController,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
decoration: InputDecoration(
|
||||
hintText: '认真写一段交友宣言可以让您的个人形象更完善哦~',
|
||||
// icon: Text('交友宣言:',style: TextStyle(color: Colors.white,fontSize: 14.sp,fontWeight: FontWeight.w500),),
|
||||
// labelText: '交友宣言:认真写一段交友宣言可以让您的个人形象更完善哦~',
|
||||
labelStyle: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 14.sp),
|
||||
hintStyle: TextStyle(
|
||||
color: Colors.white.withOpacity(0.5),
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14.sp),
|
||||
border: InputBorder.none,
|
||||
contentPadding:
|
||||
EdgeInsets.only(top: 4.sp,left:0.sp,right: 10.sp)),
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(40)
|
||||
],
|
||||
)
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@ -316,7 +330,9 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
shadows: [
|
||||
Shadow(color: const Color(0xffF657FF), blurRadius: 4.0.sp)
|
||||
Shadow(
|
||||
color: const Color(0xffF657FF),
|
||||
blurRadius: 4.0.sp)
|
||||
])),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
@ -348,10 +364,8 @@ class _Complete_materialPageState extends State<Complete_materialPage> {
|
||||
}
|
||||
|
||||
interestWdiget(String interest, Complete_materialLogic controller) {
|
||||
|
||||
return Container(
|
||||
height: 59.sp,
|
||||
|
||||
width: Get.width - 140.sp,
|
||||
child: ListView.builder(
|
||||
itemCount: controller.numbers.length,
|
||||
|
||||
@ -59,19 +59,17 @@ class LoginLogic extends GetxController {
|
||||
}
|
||||
|
||||
Future<void> getCode() async {
|
||||
|
||||
SmartDialog.showLoading(msg: '正在发送中');
|
||||
var data = await DioManager.instance.post(
|
||||
url: Api.sendCode, params: {"phone": phoneEditingController.text});
|
||||
var bean = BaseResponse<Data>.fromJson(data, (data) => Data.fromJson(data));
|
||||
|
||||
SmartDialog.dismiss();
|
||||
if (bean.code == 200) {
|
||||
showOKToast('发送成功!');
|
||||
if (kDebugMode) {
|
||||
//print("验证码:${bean.data!.code}");
|
||||
if (bean.data!.code != null) {
|
||||
codeEditingController.text = bean.data!.code.toString();
|
||||
update();
|
||||
}
|
||||
showOKToast('验证码已发送,稍后可前往短信查看');
|
||||
if (bean.data!.code != null) {
|
||||
codeEditingController.text = bean.data!.code.toString();
|
||||
update();
|
||||
}
|
||||
|
||||
t = Timer.periodic(const Duration(milliseconds: 1000), (timer) {
|
||||
|
||||
@ -17,7 +17,7 @@ import '../../util/SharedPreferencesHelper.dart';
|
||||
import '../../util/util.dart';
|
||||
import 'logic.dart';
|
||||
|
||||
const vipIcon = 'assets/images/home/icon_vip.png';
|
||||
const vipIcon = 'assets/images/home/icon_vip_more.png';
|
||||
|
||||
const MyImageWidget = Image(
|
||||
image: AssetImage(vipIcon),
|
||||
@ -70,13 +70,17 @@ class MinefragmentPage extends StatelessWidget {
|
||||
child: Stack(children: [
|
||||
logic.isProxy ? MyImageWidget1 : MyImageWidget,
|
||||
Positioned(
|
||||
top: 54.sp,
|
||||
left: 72.sp,
|
||||
child: Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 12.sp),)),
|
||||
Positioned(
|
||||
top: 26.sp,
|
||||
left: 70.sp,
|
||||
child: Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),))
|
||||
top: 24.sp,
|
||||
left: 78.sp,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("会员-微乐园贵宾",style: TextStyle(color: const Color(0xFFFFFFFF),fontSize: 16.sp),),
|
||||
SizedBox(height: 4.sp,),
|
||||
Text(logic.vipMsg,style: TextStyle(color: const Color(0x99FFFFFF),fontSize: 13.sp),),
|
||||
],
|
||||
)),
|
||||
|
||||
],),
|
||||
),
|
||||
_circleLiveView(logic),
|
||||
|
||||
@ -79,7 +79,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
backgroundColor: Colors.transparent,
|
||||
appBar: MyAppBar(
|
||||
centerTitle: logic.userInfoBean != null
|
||||
? "${logic.userInfoBean!.nickname}的主页"
|
||||
? "${logic.userInfoBean!.nickname}"
|
||||
: "个人主页",
|
||||
actionWdiget: logic.isMe ? GestureDetector(
|
||||
onTap: () {
|
||||
@ -89,8 +89,8 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 90.sp,
|
||||
height: 24.sp,
|
||||
width: 101.sp,
|
||||
height: 26.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(12.sp),
|
||||
gradient: LinearGradient(
|
||||
@ -101,18 +101,18 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 88.sp,
|
||||
width: 100.sp,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(11.sp),
|
||||
color: Color(0xFF240F3B)
|
||||
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
height: 22.sp,
|
||||
height: 24.sp,
|
||||
child: Text(
|
||||
'填写微信号',
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 12.sp),
|
||||
color: Colors.white, fontSize: 14.sp),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@ -148,7 +148,7 @@ class _AddWxTipState extends State<AddWxTip> {
|
||||
// padding: EdgeInsets.only(left: 6.sp, right: 6.sp),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
gradient: AppColor.mainLinearGradient,
|
||||
gradient: AppColor.mainVerLinearGradient,
|
||||
borderRadius: BorderRadius.circular(4.sp)),
|
||||
child: Text(
|
||||
widget.isHaveWx ? ' 更新微信 ':' 填写微信 ',
|
||||
@ -168,6 +168,7 @@ class _AddWxTipState extends State<AddWxTip> {
|
||||
),
|
||||
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
Get.back();
|
||||
},
|
||||
@ -176,7 +177,8 @@ class _AddWxTipState extends State<AddWxTip> {
|
||||
alignment: Alignment.center,
|
||||
child: Image.asset(
|
||||
getHomeImage('wx_close'),
|
||||
width: 24.sp,
|
||||
width: 32.sp,
|
||||
fit: BoxFit.fill,
|
||||
)),
|
||||
)
|
||||
],
|
||||
|
||||
@ -270,7 +270,7 @@ class _UnlockWxTipState extends State<UnlockWxTip> {
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: AppColor.mainLinearGradient
|
||||
gradient: AppColor.mainVerLinearGradient
|
||||
),
|
||||
child: Text(
|
||||
'VIP',
|
||||
|
||||
@ -4,8 +4,9 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class AppColor {
|
||||
static Color mainColor = Color(0xFF06F9FA);
|
||||
static Color mainBgColor = Color(0XFF392D53);
|
||||
|
||||
static Gradient mainLinearGradient = const LinearGradient(
|
||||
static Gradient mainVerLinearGradient = const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
@ -13,4 +14,13 @@ class AppColor {
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
);
|
||||
|
||||
static Gradient mainHorLinearGradient = const LinearGradient(
|
||||
colors: [
|
||||
Color(0xFF06F9FA),
|
||||
Color(0xFFDC5BFD),
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
);
|
||||
}
|
||||
|
||||
@ -57,13 +57,13 @@ void showFloatingButtonOverlay(
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 50.sp,
|
||||
width: 70.sp,
|
||||
child: Text(
|
||||
nickname,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||||
fontSize: 14,
|
||||
fontSize: 16.sp,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -106,7 +106,7 @@ void showFloatingButtonOverlay(
|
||||
: "我也喜欢了你,一起聊聊呗~",
|
||||
style: TextStyle(
|
||||
color: Colors.grey,
|
||||
fontSize: 12.sp,
|
||||
fontSize: 14.sp,
|
||||
),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user