1588 lines
57 KiB
Dart
1588 lines
57 KiB
Dart
|
||
|
||
import 'package:cached_network_image/cached_network_image.dart';
|
||
import 'package:circle_app/app/userinfo/widgets/home_call_out.dart';
|
||
import 'package:circle_app/common/Widgets/base_tip_widget.dart';
|
||
import 'package:circle_app/common/colors/app_color.dart';
|
||
import 'package:circle_app/common/const.dart';
|
||
import 'package:circle_app/main.dart';
|
||
import 'package:circle_app/network/api.dart';
|
||
import 'package:circle_app/view/notice.dart';
|
||
import 'package:flutter/material.dart';
|
||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||
import 'package:get/get.dart';
|
||
|
||
import '../../components/my_app_bar.dart';
|
||
import '../../router/app_routers.dart';
|
||
import '../../util/eventBus.dart';
|
||
import '../../util/util.dart';
|
||
import '../home/logic.dart';
|
||
import '../select_circle/logic.dart';
|
||
import 'logic.dart';
|
||
|
||
class UserinfoPage extends StatefulWidget {
|
||
const UserinfoPage({super.key});
|
||
|
||
@override
|
||
MyTabbedScreenState createState() => MyTabbedScreenState();
|
||
}
|
||
|
||
class MyTabbedScreenState extends State<UserinfoPage>
|
||
with SingleTickerProviderStateMixin, RouteAware {
|
||
late TabController _tabController;
|
||
|
||
ScrollController scrollController = ScrollController();
|
||
bool isShowBlackTitle = false;
|
||
|
||
bool isSetState = false;
|
||
var sub;
|
||
@override
|
||
void initState() {
|
||
super.initState();
|
||
sub = EventBusManager.on<ScrollViewScrollTop>().listen((event) {
|
||
if (isSetState) {
|
||
isSetState = false;
|
||
setState(() {
|
||
|
||
});
|
||
}
|
||
});
|
||
scrollController.addListener(() {
|
||
if (scrollController.position.pixels ==
|
||
scrollController.position.maxScrollExtent) {
|
||
print('2222');
|
||
isSetState = true;
|
||
EventBusManager.fire(ScrollViewIsEnd(true));
|
||
setState(() {
|
||
|
||
});
|
||
|
||
} else {
|
||
EventBusManager.fire(ScrollViewIsEnd(false));
|
||
if (isSetState) {
|
||
isSetState = false;
|
||
setState(() {
|
||
|
||
});
|
||
}
|
||
}
|
||
});
|
||
_tabController = TabController(length: 2, vsync: this);
|
||
_tabController.animation!.addListener(_handleTabChange);
|
||
}
|
||
|
||
@override
|
||
void didChangeDependencies() {
|
||
// TODO: implement didChangeDependencies
|
||
super.didChangeDependencies();
|
||
|
||
/// 路由订阅
|
||
routeObserver.subscribe(this, ModalRoute.of(context) as PageRoute);
|
||
}
|
||
|
||
void didPopNext() {
|
||
print('didPopNext');
|
||
if (logic.userId.isEmpty) {
|
||
logic.fetchUserInfo(Api.getUserInfo);
|
||
}
|
||
}
|
||
|
||
///当前页面进入时触发
|
||
void didPush() {
|
||
print('didPopNext');
|
||
}
|
||
|
||
void didPop() {
|
||
print('didPop');
|
||
}
|
||
|
||
void _handleTabChange() {
|
||
// 在这里可以执行滑动监听后的逻辑操作
|
||
// 比如根据当前选中的标签执行其他操作
|
||
// int currentIndex = .toString());
|
||
logic.isShowAlbum = _tabController.index == 0;
|
||
logic.update();
|
||
}
|
||
|
||
@override
|
||
void dispose() {
|
||
_tabController.dispose();
|
||
sub.cancel();
|
||
routeObserver.unsubscribe(this);
|
||
super.dispose();
|
||
}
|
||
|
||
final logic = Get.find<UserinfoLogic>();
|
||
final state = Get.find<UserinfoLogic>().state;
|
||
|
||
HomeLogic homeLogic = Get.find<HomeLogic>();
|
||
|
||
@override
|
||
Widget build(BuildContext context) {
|
||
return GetBuilder<UserinfoLogic>(
|
||
builder: (logic) {
|
||
return _buildPage(logic);
|
||
},
|
||
);
|
||
}
|
||
|
||
Widget _buildPage(UserinfoLogic logic) {
|
||
return Container(
|
||
decoration: BoxDecoration(
|
||
image: DecorationImage(
|
||
image: AssetImage(getBaseImage("home_back")),
|
||
fit: BoxFit.cover,
|
||
),
|
||
),
|
||
child: Scaffold(
|
||
backgroundColor: Colors.transparent,
|
||
appBar: homeLogic.isProd ? MyAppBar(
|
||
centerTitle: logic.userInfoBean != null
|
||
? "${logic.userInfoBean!.nickname}"
|
||
: "个人主页",
|
||
actionWdiget: logic.isMe
|
||
? GestureDetector(
|
||
onTap: () async {
|
||
await showAddWxPicker(
|
||
logic.userInfoBean!.wx_num!.isNotEmpty ?? false,
|
||
isHidden:
|
||
logic.userInfoBean!.wx_num!.isNotEmpty ?? false,
|
||
isWxHidden: logic.userInfoBean!.hide_wx_num == 1,
|
||
);
|
||
logic.fetchUserInfo(Api.getUserInfo);
|
||
},
|
||
child: Stack(
|
||
alignment: Alignment.center,
|
||
children: [
|
||
Container(
|
||
width: 101.sp,
|
||
height: 26.sp,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(12.sp),
|
||
gradient: LinearGradient(
|
||
colors: [
|
||
Color(0xFF30FFD9),
|
||
Color(0xFFDD3DF4)
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
),
|
||
Container(
|
||
width: 100.sp,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(11.sp),
|
||
color: Color(0xFF240F3B)),
|
||
alignment: Alignment.center,
|
||
height: 24.sp,
|
||
child: Text(
|
||
'填写微信号',
|
||
style: TextStyle(
|
||
color: Colors.white, fontSize: 14.sp),
|
||
),
|
||
)
|
||
],
|
||
),
|
||
// Container(
|
||
// alignment: Alignment.center,
|
||
// // width: 90.sp,
|
||
// height: 24.sp,
|
||
// padding:
|
||
// EdgeInsets.only(left: 6.sp, right: 6.sp),
|
||
// decoration: BoxDecoration(
|
||
// color: AppColor.mainColor,
|
||
// borderRadius:
|
||
// BorderRadiusDirectional.circular(
|
||
// 11.sp)),
|
||
// child: Text(
|
||
// '填写微信号',
|
||
// style: TextStyle(
|
||
// color: Colors.white, fontSize: 13.sp),
|
||
// ),
|
||
// ),
|
||
)
|
||
: logic.userInfoBean!= null ? logic.userInfoBean!.wx_num.isEmpty ? GestureDetector(
|
||
onTap: () {
|
||
logic.sendWhatToWx();
|
||
},
|
||
child: Stack(
|
||
alignment: Alignment.center,
|
||
children: [
|
||
Container(
|
||
width: 101.sp,
|
||
height: 26.sp,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(12.sp),
|
||
gradient: LinearGradient(
|
||
colors: [
|
||
Color(0xFF30FFD9),
|
||
Color(0xFFDD3DF4)
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
),
|
||
Container(
|
||
width: 100.sp,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(11.sp),
|
||
color: Color(0xFF240F3B)),
|
||
alignment: Alignment.center,
|
||
height: 24.sp,
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Image.asset(
|
||
getDisCoverImage('wx'),
|
||
width: 20.sp,
|
||
),
|
||
SizedBox(
|
||
width: 2.sp,
|
||
),
|
||
Text(
|
||
'想要微信号',
|
||
style: TextStyle(
|
||
color: Colors.white, fontSize: 13.sp),
|
||
),
|
||
],
|
||
),
|
||
)
|
||
],
|
||
),
|
||
) : Container() : Container()) : MyAppBar(
|
||
centerTitle: logic.userInfoBean != null
|
||
? "${logic.userInfoBean!.nickname}"
|
||
: "个人主页",
|
||
),
|
||
body: Stack(
|
||
// fit: StackFit.expand,
|
||
children: [
|
||
Container(
|
||
height: Get.height,
|
||
width: Get.width,
|
||
// color: Colors.red,
|
||
child:
|
||
NestedScrollView(
|
||
controller: scrollController,
|
||
headerSliverBuilder: (context,isScrolled) {
|
||
return [
|
||
SliverAppBar(
|
||
stretch: false,
|
||
elevation: 0,
|
||
primary: true,
|
||
pinned: true,
|
||
floating: true,
|
||
forceElevated: false,
|
||
toolbarHeight: 0,
|
||
foregroundColor: Colors.transparent,
|
||
backgroundColor: Colors.transparent,
|
||
expandedHeight: 374.sp + (logic.userInfoBean != null
|
||
? logic.userInfoBean!.wx_num!.isNotEmpty && logic.userId.toString().isNotEmpty
|
||
? 59.sp : 0 : 0),
|
||
bottom: PreferredSize(
|
||
preferredSize: Size(Get.width,40),
|
||
child: titleTab(logic),
|
||
),
|
||
flexibleSpace: FlexibleSpaceBar(
|
||
expandedTitleScale: 1.0,
|
||
centerTitle: true,
|
||
title: buildContent(logic),
|
||
),
|
||
)
|
||
];
|
||
},
|
||
body: contentWidget(logic),
|
||
// slivers: [
|
||
// SliverAppBar(
|
||
// leadingWidth: 0,
|
||
// titleSpacing: 0,
|
||
// title: buildContent(logic),
|
||
// toolbarHeight: 500.sp,
|
||
// backgroundColor: Colors.transparent,
|
||
// ),
|
||
// SliverPadding(
|
||
// padding: EdgeInsets.zero,
|
||
// sliver: SliverList(delegate:
|
||
// SliverChildBuilderDelegate((context, index) {
|
||
// // if (index == 0) {
|
||
// // return buildContent(logic);
|
||
// // }
|
||
// return contentWidget(logic);
|
||
// },childCount: 1),))
|
||
//
|
||
// // (delegate: (BuildContext context, int index) {
|
||
// // return contentWidget(logic);
|
||
// // }),
|
||
//
|
||
// // buildContent(logic),
|
||
// ]
|
||
)),
|
||
Positioned(
|
||
bottom: 27.sp,
|
||
width: Get.width,
|
||
child: _meInfoButton(logic),
|
||
),
|
||
!logic.isShowAlbum && logic.isMe
|
||
? Positioned(
|
||
bottom: 36.sp,
|
||
right: 10.sp,
|
||
child: GestureDetector(
|
||
onTap: () async {
|
||
List<MyConfigData> numbers = [];
|
||
|
||
var data = await Get.toNamed(AppRoutes.Call_out,
|
||
arguments: {'numbers': numbers});
|
||
},
|
||
child: Image.asset(
|
||
getCircleImage('send_msg'),
|
||
width: 60.sp,
|
||
)))
|
||
: Container()
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget _meInfoButton(UserinfoLogic controller) {
|
||
if (controller.isMe) {
|
||
return GestureDetector(
|
||
onTap: () async {
|
||
await Get.toNamed(
|
||
AppRoutes.Complete_materialPage,
|
||
arguments: "user",
|
||
);
|
||
logic.onInit();
|
||
},
|
||
child: Center(
|
||
child: Container(
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0xFF06F9FA),
|
||
Color(0xFFDC5BFD),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
padding: EdgeInsets.symmetric(
|
||
vertical: 10.sp,
|
||
horizontal: 55.sp,
|
||
),
|
||
child: const Text(
|
||
"完善个人形象",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
));
|
||
} else {
|
||
final likeButton = GestureDetector(
|
||
onTap: () {
|
||
_showBottomSheet(context, controller);
|
||
},
|
||
child: Image(
|
||
image: AssetImage(getMineImage("icon_like")),
|
||
width: 40.sp,
|
||
height: 40.sp,
|
||
),
|
||
);
|
||
|
||
final likeText = Text(
|
||
controller.isLike ? "取消喜欢" : "喜欢",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12.sp,
|
||
),
|
||
);
|
||
|
||
final chatText = Text(
|
||
"私聊",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12.sp,
|
||
),
|
||
);
|
||
|
||
final gradientDecoration = BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17.sp),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0xff06F9FA),
|
||
Color(0xffDC5BFD),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
);
|
||
|
||
final chatButton = GestureDetector(
|
||
onTap: () {
|
||
if (logic.isBlack || logic.isDestroy || logic.isBlackBeen) {
|
||
showOKToast("私聊失败,存在拉黑关系或者该账户已注销");
|
||
return;
|
||
}
|
||
|
||
if (logic.userInfoBean != null) {
|
||
String msg = Get.previousRoute;
|
||
if (msg == AppRoutes.Chat) {
|
||
Get.back();
|
||
} else {
|
||
pushChatPage(logic.userInfoBean!.id.toString(), logic.imId,
|
||
logic.userInfoBean!.nickname);
|
||
}
|
||
}
|
||
},
|
||
child: Container(
|
||
width: 130.sp,
|
||
height: 34.sp,
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17.sp),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0xffDC5BFD),
|
||
Color(0xff06F9FA),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
child: Center(child: chatText),
|
||
),
|
||
);
|
||
|
||
return Container(
|
||
margin: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
likeButton,
|
||
GestureDetector(
|
||
onTap: () {
|
||
logic.setLike();
|
||
},
|
||
child: Container(
|
||
width: 130.sp,
|
||
height: 34.sp,
|
||
decoration: gradientDecoration,
|
||
child: Center(child: likeText),
|
||
),
|
||
),
|
||
chatButton,
|
||
],
|
||
),
|
||
);
|
||
}
|
||
}
|
||
|
||
Widget buildContent(UserinfoLogic controller) {
|
||
final userInfoBean = controller.userInfoBean;
|
||
final interests = userInfoBean?.interests ?? [];
|
||
|
||
return Container(
|
||
// color: Colors.red,
|
||
width: Get.width,
|
||
// height: Get.height,
|
||
padding: EdgeInsets.symmetric(vertical: 14.sp),
|
||
child: Column(
|
||
children: [
|
||
Container(
|
||
height: 58.sp,
|
||
padding: EdgeInsets.symmetric(horizontal: 15.sp),
|
||
child: Row(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
_imagelistView(controller),
|
||
Expanded(
|
||
child: buildUserContainer(controller),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
Container(
|
||
padding: EdgeInsets.symmetric(
|
||
horizontal: 15.sp,
|
||
),
|
||
margin: EdgeInsets.only(top: 19.sp),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
Row(
|
||
children: [
|
||
Text(
|
||
userInfoBean?.nickname ?? "",
|
||
style: TextStyle(
|
||
color: Color.fromRGBO(247, 250, 250, 1.0),
|
||
fontSize: 14.sp,
|
||
),
|
||
),
|
||
SizedBox(width: 8.sp),
|
||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: _buildInfoRow(controller),
|
||
],
|
||
),
|
||
Row(
|
||
children: [
|
||
Container(
|
||
margin: EdgeInsets.only(right: 5.sp),
|
||
width: 5.sp,
|
||
height: 5.sp,
|
||
decoration: BoxDecoration(
|
||
shape: BoxShape.circle,
|
||
color: logic.isOnline
|
||
? const Color(0xFF00FFF4)
|
||
: const Color(0x00000000),
|
||
),
|
||
),
|
||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: Text(
|
||
controller.onLineCity,
|
||
style: TextStyle(
|
||
fontSize: 12.sp,
|
||
color: logic.isOnline
|
||
? const Color(0xFF00FFF4)
|
||
: const Color(0xFF00FFF4),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
],
|
||
),
|
||
),
|
||
SizedBox(
|
||
height: 78.sp,
|
||
child: logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: _buildInterestsListView(interests),
|
||
),
|
||
if (!logic.isMe)
|
||
logic.userInfoBean != null
|
||
? logic.userInfoBean!.wx_num!.isNotEmpty
|
||
? Container(
|
||
alignment: Alignment.centerLeft,
|
||
// width: 200.sp,
|
||
// color: Colors.red,
|
||
margin: EdgeInsets.only(left: 15.sp, bottom: 15.sp),
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.start,
|
||
children: [
|
||
wxStatusWidget(
|
||
logic.unLockWxNum == 1,
|
||
logic.userInfoBean!.wx_num,
|
||
logic.userInfoBean!.id.toString(),
|
||
logic.userInfoBean!.avatar!,
|
||
() {
|
||
logic. fetchUserInfo("${Api.getUserInfoTA + logic.userId}/home");
|
||
}),
|
||
],
|
||
))
|
||
: Container()
|
||
: Container(),
|
||
if (logic.userInfoBean != null && logic.giftList.isNotEmpty)
|
||
GestureDetector(
|
||
onTap: () async {
|
||
var result = await Get.toNamed(AppRoutes.GiftShopPage,
|
||
arguments: logic.userId);
|
||
logic.loadGiftListData();
|
||
},
|
||
child: Container(
|
||
margin: EdgeInsets.only(
|
||
top: 0.sp, left: 15.sp, right: 10.sp, bottom: 10.sp),
|
||
padding: EdgeInsets.only(
|
||
left: 12.sp, right: 12.sp, bottom: 18.sp, top: 16.sp),
|
||
height: 144.sp,
|
||
decoration: BoxDecoration(
|
||
color: Color(0x1AFFFFFF),
|
||
borderRadius: BorderRadius.circular(14.sp)),
|
||
child: Column(
|
||
children: [
|
||
Container(
|
||
child: Row(
|
||
children: [
|
||
Image.asset(
|
||
getMineImage('gift_shop_icon'),
|
||
width: 65.sp,
|
||
),
|
||
Expanded(child: Container()),
|
||
Text(
|
||
logic.toUser.isNotEmpty ? '贡献之星' : '贡献之星还在路上',
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 14.sp,
|
||
),
|
||
),
|
||
if (logic.toUser.isNotEmpty)
|
||
SizedBox(
|
||
width: 6.sp,
|
||
),
|
||
if (logic.toUser.isNotEmpty)
|
||
Text(
|
||
'${logic.toUser['nickname']}',
|
||
style: TextStyle(
|
||
color: AppColor.mainColor,
|
||
fontSize: 14.sp,
|
||
),
|
||
),
|
||
SizedBox(
|
||
width: 8.sp,
|
||
),
|
||
Image.asset(
|
||
getMineImage('chevron_left'),
|
||
width: 14.sp,
|
||
),
|
||
],
|
||
),
|
||
),
|
||
Expanded(
|
||
child: Container(
|
||
margin: EdgeInsets.only(top: 10.sp),
|
||
alignment: Alignment.centerLeft,
|
||
child: ListView.builder(
|
||
scrollDirection: Axis.horizontal,
|
||
itemCount: logic.giftList.length,
|
||
itemBuilder: (BuildContext context, int giftIndex) {
|
||
var info = logic.giftList[giftIndex];
|
||
bool isGet = false;
|
||
int num = 0;
|
||
logic.recevigiftList.forEach((element) {
|
||
if (element['giftId'] == info['id']) {
|
||
isGet = true;
|
||
num = element['num'];
|
||
}
|
||
});
|
||
return GestureDetector(
|
||
onTap: () {},
|
||
child: Container(
|
||
margin: EdgeInsets.only(right: 10.sp),
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Stack(children: [
|
||
Opacity(
|
||
opacity: !isGet ? 0.6 : 1,
|
||
child: Image.network(
|
||
info['icon'],
|
||
width: 50.sp,
|
||
height: 50.sp,
|
||
fit: BoxFit.cover,
|
||
),
|
||
),
|
||
]),
|
||
SizedBox(
|
||
height: 6.sp,
|
||
),
|
||
GestureDetector(
|
||
onTap: () {
|
||
logic.sendGiftData(
|
||
logic.imId,
|
||
info['id'].toString(),
|
||
logic.imId.split('_').last,
|
||
);
|
||
},
|
||
child: Container(
|
||
height: 20.sp,
|
||
width: 52.sp,
|
||
// padding: EdgeInsets.only(left: 5.sp,right: 5.sp),
|
||
alignment: Alignment.center,
|
||
decoration: BoxDecoration(
|
||
gradient:
|
||
AppColor.mainVerLinearGradient,
|
||
borderRadius:
|
||
BorderRadius.circular(10.sp)),
|
||
child: Text(
|
||
!isGet ? '点亮' : '赠送',
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 11.sp),
|
||
),
|
||
),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
);
|
||
}),
|
||
))
|
||
],
|
||
),
|
||
),
|
||
),
|
||
// titleTab(controller),
|
||
],
|
||
),
|
||
);
|
||
|
||
// Expanded(
|
||
// child: PageView(
|
||
// controller: _pageController,
|
||
// onPageChanged: (index) {
|
||
// _tabController.animateTo(index);
|
||
// },
|
||
// children: [
|
||
// logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
// ? Container()
|
||
// : _imageAdapter(controller),
|
||
// logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
// ? Container()
|
||
// : HomeCallOutView(controller.userId),
|
||
// ],
|
||
// ),
|
||
// ),
|
||
}
|
||
|
||
contentWidget(UserinfoLogic controller) {
|
||
return TabBarView(
|
||
controller: _tabController,
|
||
// controller: _pageController,
|
||
// onPageChanged: (index) {
|
||
// _tabController.animateTo(index);
|
||
// },
|
||
children: [
|
||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: _imageAdapter(controller),
|
||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: HomeCallOutView(controller.userId),
|
||
],
|
||
|
||
);
|
||
}
|
||
|
||
Widget _buildInterestsListView(List<Interest> interests) {
|
||
return ListView.builder(
|
||
itemCount: interests.length,
|
||
scrollDirection: Axis.horizontal,
|
||
padding: EdgeInsets.symmetric(vertical: 15.sp, horizontal: 15.sp),
|
||
itemBuilder: (context, index) {
|
||
final interest = interests[index];
|
||
return GestureDetector(
|
||
onTap: () {
|
||
Get.toNamed(AppRoutes.Signal_circle_list,
|
||
arguments: interests[index].id);
|
||
},
|
||
child: Container(
|
||
margin: EdgeInsets.only(right: 11.sp),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(8.0),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0xFF06F9FA),
|
||
Color(0xFFDC5BFD),
|
||
],
|
||
),
|
||
color: const Color(0xFF392D53),
|
||
),
|
||
child: Container(
|
||
margin: EdgeInsets.all(0.2.sp),
|
||
padding: EdgeInsets.only(left: 5.sp, right: 0.sp, top: 5.sp),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(8.0),
|
||
color: const Color(0xFF392D53),
|
||
),
|
||
child: Column(
|
||
crossAxisAlignment: CrossAxisAlignment.start,
|
||
children: [
|
||
Container(
|
||
// color: Colors.red,
|
||
child: Row(
|
||
children: [
|
||
Text(
|
||
interest.title,
|
||
style: TextStyle(
|
||
fontSize: 13.sp,
|
||
color: Colors.white,
|
||
),
|
||
),
|
||
Container(
|
||
margin: EdgeInsets.only(
|
||
bottom: 2.sp,
|
||
),
|
||
child: Icon(
|
||
Icons.keyboard_arrow_right,
|
||
color: Colors.white,
|
||
size: 18.sp,
|
||
),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
Text(
|
||
'${interest.viewTotal}人看过',
|
||
style: TextStyle(
|
||
fontSize: 13.sp,
|
||
color: AppColor.mainColor,
|
||
),
|
||
),
|
||
],
|
||
)),
|
||
),
|
||
);
|
||
},
|
||
);
|
||
}
|
||
|
||
Widget titleTab(UserinfoLogic controller) {
|
||
String buttonText = "";
|
||
|
||
if (controller.isMe) {
|
||
if (logic.isShowAlbum) {
|
||
buttonText = controller.isEdit ? "完成" : "管理";
|
||
} else {
|
||
buttonText = "发布喊话";
|
||
}
|
||
} else {
|
||
buttonText = controller.isUrgeStatus ? "已催更" : "催更";
|
||
}
|
||
return Container(
|
||
alignment: Alignment.centerLeft,
|
||
padding: EdgeInsets.only(left: 0, right: 10.sp),
|
||
height: 27.sp,
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
TabBar(
|
||
isScrollable: true,
|
||
controller: _tabController,
|
||
indicator: UnderlineTabIndicator(
|
||
borderSide: BorderSide(
|
||
color: const Color(0xFF00FFF4),
|
||
width: 2.sp,
|
||
),
|
||
insets: EdgeInsets.symmetric(horizontal: 12.0.sp),
|
||
borderRadius: BorderRadius.circular(18.0),
|
||
),
|
||
indicatorColor: const Color(0xFF00FFF4),
|
||
indicatorWeight: 2.sp,
|
||
labelColor: const Color(0xFF00FFF4),
|
||
unselectedLabelColor: const Color(0xB3FFFFFF),
|
||
indicatorSize: TabBarIndicatorSize.label,
|
||
tabs: const [
|
||
Tab(
|
||
text: "形象照",
|
||
),
|
||
Tab(text: "喊话"),
|
||
],
|
||
// onTap: (index) {
|
||
// _pageController.animateToPage(
|
||
// index, // 目标页面索引
|
||
// duration: const Duration(milliseconds: 300), // 动画时长
|
||
// curve: Curves.ease, // 动画曲线
|
||
// );
|
||
// },
|
||
),
|
||
logic.isBlack || logic.isDestroy || logic.isBlackBeen
|
||
? Container()
|
||
: _tabController.index == 0
|
||
? GestureDetector(
|
||
onTap: () {
|
||
if (!logic.isShowAlbum && controller.isMe) {
|
||
List<MyConfigData> numbers = [];
|
||
var data = Get.toNamed(AppRoutes.Call_out,
|
||
arguments: {'numbers': numbers});
|
||
return;
|
||
}
|
||
if (controller.isMe) {
|
||
controller.isEdit = !controller.isEdit;
|
||
controller.update();
|
||
} else {
|
||
controller.urgeChange();
|
||
}
|
||
},
|
||
child: Visibility(
|
||
// visible: logic.isShowAlbum,
|
||
child: Container(
|
||
margin: EdgeInsets.only(left: 10.sp),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0xFF06F9FA),
|
||
Color(0xFFDC5BFD),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
padding: EdgeInsets.symmetric(
|
||
vertical: 2.sp,
|
||
horizontal: 12.sp,
|
||
),
|
||
child: Text(
|
||
buttonText,
|
||
style: const TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
)
|
||
: Container(),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget _imageAdapter(UserinfoLogic controller) {
|
||
//print(controller.state.imaglist);
|
||
|
||
// :
|
||
return Container(
|
||
margin: EdgeInsets.only(top: isSetState ? 40.sp : 0.sp),
|
||
padding: EdgeInsets.symmetric(horizontal: 19.sp),
|
||
child: Stack(
|
||
children: [
|
||
Column(
|
||
children: [
|
||
if (controller.isMe)
|
||
Container(
|
||
margin: EdgeInsets.only(top: 18.sp, bottom: 14.sp),
|
||
child: Text(
|
||
controller.isLikeFoMsg,
|
||
style: const TextStyle(color: Colors.white30),
|
||
),
|
||
),
|
||
controller.state.imaglist.isEmpty && !controller.isMe
|
||
? Center(
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.start,
|
||
children: [
|
||
const SizedBox(
|
||
height: 30,
|
||
),
|
||
Image.asset(
|
||
getBaseImage('no_result'),
|
||
width: 200,
|
||
// height: 11,
|
||
),
|
||
const SizedBox(
|
||
height: 26,
|
||
),
|
||
Text(
|
||
controller.isMe
|
||
? "点击管理即可上传形象照哦~"
|
||
: "TA还没有发布过形象照,快去催TA更新吧~",
|
||
style: const TextStyle(color: Colors.white30),
|
||
),
|
||
]),
|
||
)
|
||
: Expanded(
|
||
child: GridView.builder(
|
||
padding: const EdgeInsets.only(bottom: 58.0),
|
||
shrinkWrap: true,
|
||
gridDelegate:
|
||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||
crossAxisCount: 3,
|
||
),
|
||
itemCount: controller.isMe
|
||
// ? controller.isEdit
|
||
// ? controller.state.imaglist.length < 15
|
||
// ? controller.state.imaglist.length
|
||
? controller.state.imaglist.length + 1
|
||
: controller.state.imaglist.length,
|
||
itemBuilder: (BuildContext context, int index) {
|
||
// print("123123123123");
|
||
if (controller.isMe) {
|
||
if (index == 0) {
|
||
return GestureDetector(
|
||
onTap: () {
|
||
if (controller.state.imaglist.length >= 15) {
|
||
showOKToast("最大只可上传15张图片哦~");
|
||
return;
|
||
}
|
||
controller.getImageFile();
|
||
},
|
||
child: Container(
|
||
margin: EdgeInsets.all(5.sp),
|
||
child: Image(
|
||
image: AssetImage(
|
||
getMineImage("icon_img_add")),
|
||
),
|
||
),
|
||
);
|
||
} else {
|
||
return Container(
|
||
margin: EdgeInsets.all(5.sp),
|
||
child: Center(
|
||
child: _buildImageItem(
|
||
controller.state.imaglist[index - 1].url,
|
||
controller,
|
||
index - 1,
|
||
),
|
||
),
|
||
);
|
||
}
|
||
} else {
|
||
return Container(
|
||
margin: EdgeInsets.all(5.sp),
|
||
child: Center(
|
||
child: _buildImageItem(
|
||
controller.state.imaglist[index].urlThumb,
|
||
controller,
|
||
index,
|
||
),
|
||
),
|
||
);
|
||
}
|
||
},
|
||
),
|
||
),
|
||
],
|
||
),
|
||
],
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget _buildInfoRow(UserinfoLogic controller) {
|
||
return Row(
|
||
children: [
|
||
Container(
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color.fromRGBO(141, 255, 248, 1.0),
|
||
Color.fromRGBO(181, 211, 255, 1.0),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
padding: EdgeInsets.only(
|
||
top: 2.sp,
|
||
bottom: 2.sp,
|
||
left: 10.sp,
|
||
right: 10.sp,
|
||
),
|
||
child: Text(
|
||
controller.ageMsg,
|
||
style: const TextStyle(
|
||
color: Colors.black,
|
||
fontSize: 10,
|
||
),
|
||
),
|
||
),
|
||
const SizedBox(width: 6),
|
||
if (controller.isVip > 0)
|
||
Image(
|
||
image: AssetImage(
|
||
getBaseImage(controller.isVip == 1 ? "vip" : 'year_vip')),
|
||
width: 44.sp,
|
||
height: 18.sp,
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
Widget buildUserContainer(UserinfoLogic controller) {
|
||
return Container(
|
||
margin: EdgeInsets.only(left: 3.sp),
|
||
height: 58.sp,
|
||
decoration: BoxDecoration(
|
||
image: DecorationImage(
|
||
image: AssetImage(getMineImage("icon_user_content")),
|
||
fit: BoxFit.fill,
|
||
),
|
||
),
|
||
child: Container(
|
||
margin: EdgeInsets.only(left: 24.sp),
|
||
child: Center(
|
||
child: Text(
|
||
controller.userInfoBean != null
|
||
? controller.userInfoBean!.signature
|
||
: "",
|
||
maxLines: 2,
|
||
style: TextStyle(color: Colors.white,fontSize: 15.sp),
|
||
overflow: TextOverflow.ellipsis,
|
||
),
|
||
),
|
||
),
|
||
);
|
||
}
|
||
|
||
Widget _imagelistView(UserinfoLogic controller) {
|
||
return Stack(
|
||
alignment: Alignment.center,
|
||
children: [
|
||
Container(
|
||
width: 68.sp,
|
||
height: 68.sp,
|
||
decoration: const BoxDecoration(
|
||
shape: BoxShape.circle,
|
||
gradient: LinearGradient(
|
||
colors: [Color(0xFFDD3DF4), Color(0xFF30FFD9)],
|
||
begin: Alignment.topCenter,
|
||
end: Alignment.bottomCenter,
|
||
),
|
||
),
|
||
),
|
||
SizedBox(
|
||
width: 66.sp,
|
||
height: 66.sp,
|
||
child: _buildAvatar1(controller),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
Widget _buildAvatar1(UserinfoLogic controller) {
|
||
if (controller.userInfoBean == null) {
|
||
return SizedBox(
|
||
width: 66.sp,
|
||
height: 66.sp,
|
||
);
|
||
} else {
|
||
return ClipOval(
|
||
child: GestureDetector(
|
||
onTap: () {
|
||
var imgList = <String>[];
|
||
imgList.add(controller.userInfoBean!.avatar);
|
||
Get.toNamed(AppRoutes.Swiper,
|
||
arguments: {'imaglist': imgList, 'index': 0});
|
||
},
|
||
child: CachedNetworkImage(
|
||
fit: BoxFit.cover,
|
||
placeholder: null,
|
||
imageUrl: controller.userInfoBean != null
|
||
? controller.userInfoBean!.avatar
|
||
: "",
|
||
width: 66.sp,
|
||
height: 66.sp,
|
||
),
|
||
),
|
||
);
|
||
}
|
||
}
|
||
|
||
Widget _buildImageItem(String url, UserinfoLogic controller, int index) {
|
||
return Stack(
|
||
children: [
|
||
SizedBox(
|
||
width: double.infinity,
|
||
height: double.infinity,
|
||
child: ClipRRect(
|
||
borderRadius: BorderRadius.circular(0.0),
|
||
child: GestureDetector(
|
||
onTap: () {
|
||
List<String> imaglist = [];
|
||
for (var element in controller.state.imaglist) {
|
||
imaglist.add(element.url);
|
||
}
|
||
Get.toNamed(AppRoutes.Swiper,
|
||
arguments: {'imaglist': imaglist, 'index': index});
|
||
},
|
||
child: Image.network(
|
||
fit: BoxFit.cover,
|
||
url,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
if (controller.userId == "")
|
||
Positioned(
|
||
top: 0,
|
||
right: 0,
|
||
child: GestureDetector(
|
||
onTap: () {
|
||
_showDelImgDialog(context, controller, index);
|
||
},
|
||
child: Visibility(
|
||
visible: controller.isEdit,
|
||
child: Image(
|
||
image: AssetImage(getMineImage("icon_img_del")),
|
||
width: 20.sp,
|
||
height: 20.sp,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
],
|
||
);
|
||
}
|
||
|
||
void _showBottomSheet(BuildContext context, UserinfoLogic controller) {
|
||
showModalBottomSheet(
|
||
context: context,
|
||
backgroundColor: Colors.transparent,
|
||
builder: (BuildContext context) {
|
||
return Container(
|
||
decoration: const BoxDecoration(
|
||
borderRadius: BorderRadius.only(
|
||
topLeft: Radius.circular(16.0),
|
||
topRight: Radius.circular(16.0),
|
||
),
|
||
gradient: LinearGradient(
|
||
colors: [
|
||
Color(0xFF4A3E5D),
|
||
Color(0xFF344143),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
height: 118.0,
|
||
width: double.infinity,
|
||
child: Row(
|
||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||
children: [
|
||
GestureDetector(
|
||
onTap: () {
|
||
Navigator.pop(context);
|
||
Get.toNamed(AppRoutes.ReportActivity,
|
||
arguments: {"userId": logic.userId});
|
||
},
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Image(
|
||
image: AssetImage(getMineImage("icon_report")),
|
||
width: 40.sp,
|
||
height: 40.sp,
|
||
),
|
||
Container(
|
||
margin: EdgeInsets.only(top: 2.sp),
|
||
child: const Text(
|
||
"举报",
|
||
style: TextStyle(color: Colors.white),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
GestureDetector(
|
||
onTap: () {
|
||
if (controller.isBlack) {
|
||
logic.setBlock("0");
|
||
Navigator.pop(context);
|
||
} else {
|
||
Navigator.pop(context);
|
||
_showReportDialog(context);
|
||
}
|
||
},
|
||
child: Column(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
children: [
|
||
Image(
|
||
image: AssetImage(getMineImage("icon_block")),
|
||
width: 40.sp,
|
||
height: 40.sp,
|
||
),
|
||
Container(
|
||
margin: EdgeInsets.only(top: 2.sp),
|
||
child: Text(
|
||
controller.isBlack ? "取消拉黑" : "拉黑",
|
||
style: TextStyle(color: Colors.white),
|
||
),
|
||
),
|
||
],
|
||
),
|
||
),
|
||
],
|
||
),
|
||
);
|
||
},
|
||
);
|
||
}
|
||
|
||
void _showDelImgDialog(
|
||
BuildContext context, UserinfoLogic controller, int index) {
|
||
showDialog(
|
||
context: context,
|
||
builder: (BuildContext context) {
|
||
return Dialog(
|
||
backgroundColor: Colors.transparent,
|
||
child: Container(
|
||
height: 160.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: 12.sp, left: 14.sp, right: 14.sp),
|
||
alignment: Alignment.center,
|
||
child: Text(
|
||
"是否确认删除该形象照。",
|
||
textAlign: TextAlign.center,
|
||
style: TextStyle(
|
||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||
),
|
||
),
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
GestureDetector(
|
||
onTap: () {
|
||
Navigator.pop(context);
|
||
},
|
||
child: Container(
|
||
margin: EdgeInsets.only(top: 30.sp),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0x26FFFFFF),
|
||
Color(0x26FFFFFF),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
padding: EdgeInsets.only(
|
||
top: 10.sp,
|
||
bottom: 10.sp,
|
||
left: 52.sp,
|
||
right: 52.sp),
|
||
child: const Text(
|
||
"否",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
SizedBox(width: 24.sp),
|
||
GestureDetector(
|
||
onTap: () {
|
||
Navigator.pop(context);
|
||
controller.delAlbumImage(index);
|
||
},
|
||
child: Container(
|
||
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: const Text(
|
||
"是",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
)
|
||
],
|
||
)
|
||
],
|
||
),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
);
|
||
},
|
||
);
|
||
}
|
||
|
||
void _showReportDialog(BuildContext context) {
|
||
showDialog(
|
||
context: context,
|
||
builder: (BuildContext context) {
|
||
return 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(getMineImage("icon_dialog_black")),
|
||
width: 70.sp,
|
||
height: 70.sp,
|
||
),
|
||
),
|
||
Container(
|
||
margin: EdgeInsets.only(
|
||
top: 12.sp, left: 14.sp, right: 14.sp),
|
||
alignment: Alignment.center,
|
||
child: Text(
|
||
"拉黑后,你将屏蔽对方的任何信息若您关注了对方,将自动取消关注。",
|
||
textAlign: TextAlign.center,
|
||
style: TextStyle(
|
||
color: const Color(0xCCF7FAFA), fontSize: 16.sp),
|
||
),
|
||
),
|
||
Row(
|
||
mainAxisAlignment: MainAxisAlignment.center,
|
||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
children: [
|
||
GestureDetector(
|
||
onTap: () {
|
||
Navigator.pop(context);
|
||
},
|
||
child: Container(
|
||
margin: EdgeInsets.only(top: 24.sp),
|
||
decoration: BoxDecoration(
|
||
borderRadius: BorderRadius.circular(17),
|
||
gradient: const LinearGradient(
|
||
colors: [
|
||
Color(0x26FFFFFF),
|
||
Color(0x26FFFFFF),
|
||
],
|
||
begin: Alignment.centerLeft,
|
||
end: Alignment.centerRight,
|
||
),
|
||
),
|
||
padding: EdgeInsets.only(
|
||
top: 10.sp,
|
||
bottom: 10.sp,
|
||
left: 52.sp,
|
||
right: 52.sp),
|
||
child: const Text(
|
||
"否",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
),
|
||
SizedBox(width: 24.sp),
|
||
GestureDetector(
|
||
onTap: () {
|
||
logic.setBlock("1");
|
||
},
|
||
child: Container(
|
||
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: const Text(
|
||
"是",
|
||
style: TextStyle(
|
||
color: Colors.white,
|
||
fontSize: 12,
|
||
),
|
||
),
|
||
),
|
||
)
|
||
],
|
||
)
|
||
],
|
||
),
|
||
)
|
||
],
|
||
),
|
||
),
|
||
);
|
||
},
|
||
);
|
||
}
|
||
}
|
||
|
||
|
||
class ScrollViewIsEnd {
|
||
bool isEnd;
|
||
ScrollViewIsEnd(this.isEnd);
|
||
}
|
||
|
||
class ScrollViewScrollTop {
|
||
} |