|
|
@@ -19,12 +19,14 @@ import 'package:location/widget/shimmer_effect.dart';
|
|
|
import 'package:sliding_sheet2/sliding_sheet2.dart';
|
|
|
import 'package:visibility_detector/visibility_detector.dart';
|
|
|
import '../../data/consts/constants.dart';
|
|
|
+import '../../resource/fonts.gen.dart';
|
|
|
import '../../router/app_pages.dart';
|
|
|
import '../../utils/common_style.dart';
|
|
|
import '../../utils/common_util.dart';
|
|
|
import '../../widget/activity_countdown_txt_view.dart';
|
|
|
import '../../widget/marquee_text.dart';
|
|
|
import '../../widget/relative_time_text.dart';
|
|
|
+import 'main_common_view.dart';
|
|
|
import 'main_friend_item.dart';
|
|
|
|
|
|
class MainPage extends BasePage<MainController> {
|
|
|
@@ -50,23 +52,65 @@ class MainPage extends BasePage<MainController> {
|
|
|
onPopInvokedWithResult: (bool didPop, dynamic result) {
|
|
|
controller.onAppBack();
|
|
|
},
|
|
|
- child: Column(
|
|
|
+ child: Stack(
|
|
|
children: [
|
|
|
- Expanded(
|
|
|
- child: Stack(
|
|
|
- children: [
|
|
|
- buildMapView(),
|
|
|
- buildMapFunView(),
|
|
|
- buildMainBottomView(),
|
|
|
- buildFriendListView(),
|
|
|
- ],
|
|
|
- )),
|
|
|
- buildTabContainer()
|
|
|
+ buildMapView(),
|
|
|
+ buildMainCaringReportView(),
|
|
|
+ buildMainFunView(),
|
|
|
+ buildMapFunView(),
|
|
|
+ buildMapLogoView(),
|
|
|
+ buildMainSlidingSheetView(),
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ Widget buildMainFunView() {
|
|
|
+ return Positioned(
|
|
|
+ right: 12.w,
|
|
|
+ top: 35.w,
|
|
|
+ child: SafeArea(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Container(
|
|
|
+ child: buildMainFunctionView(
|
|
|
+ Assets.images.iconMainMine.provider(),
|
|
|
+ StringName.mainTabMine,
|
|
|
+ onTap: controller.onMineClick)),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
+ Container(
|
|
|
+ child: buildMainFunctionView(
|
|
|
+ Assets.images.iconMainFriend.provider(),
|
|
|
+ StringName.mainTabFriend,
|
|
|
+ onTap: controller.onFriendClick)),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
+ Container(
|
|
|
+ child: buildMainFunctionView(
|
|
|
+ Assets.images.iconMainNews.provider(),
|
|
|
+ StringName.mainTabNews,
|
|
|
+ onTap: controller.onNewsClick)),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget buildMainCaringReportView() {
|
|
|
+ return Positioned(
|
|
|
+ left: -8.w,
|
|
|
+ top: 6.w,
|
|
|
+ child: SafeArea(
|
|
|
+ child: SizedBox(
|
|
|
+ width: 210.w,
|
|
|
+ child: AspectRatio(
|
|
|
+ aspectRatio: 187 / 69,
|
|
|
+ child: Assets.images.imgMainCaringReport.image(),
|
|
|
+ ),
|
|
|
+ )),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
Widget buildMapView() {
|
|
|
return Padding(
|
|
|
padding: EdgeInsets.only(bottom: 50.h),
|
|
|
@@ -79,7 +123,7 @@ class MainPage extends BasePage<MainController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget buildMainBottomView() {
|
|
|
+ Widget buildMainSlidingSheetView() {
|
|
|
return Obx(() {
|
|
|
if (controller.lastSelectedGoods == null) {
|
|
|
return buildSlidingSheet(false);
|
|
|
@@ -91,6 +135,9 @@ class MainPage extends BasePage<MainController> {
|
|
|
|
|
|
SlidingSheet buildSlidingSheet(bool isShowActivity) {
|
|
|
return SlidingSheet(
|
|
|
+ listener: (SheetState state) {
|
|
|
+ controller.setSheetProgress(state.progress);
|
|
|
+ },
|
|
|
key: Key(isShowActivity ? 'activity_view' : 'not_activity_view'),
|
|
|
color: ColorName.transparent,
|
|
|
snapSpec: SnapSpec(
|
|
|
@@ -118,7 +165,7 @@ class MainPage extends BasePage<MainController> {
|
|
|
controller.onFriendVisibleFraction(visibleFraction);
|
|
|
},
|
|
|
child: Container(
|
|
|
- color: '#F9F9F9'.color,
|
|
|
+ color: '#EFF4FC'.color,
|
|
|
child: AspectRatio(
|
|
|
aspectRatio: 336 / 134,
|
|
|
child: Container(
|
|
|
@@ -317,49 +364,49 @@ class MainPage extends BasePage<MainController> {
|
|
|
));
|
|
|
}
|
|
|
|
|
|
- Widget buildFriendListView() {
|
|
|
- return SafeArea(
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(top: 26.w),
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- Expanded(child: buildMainFriendList()),
|
|
|
- GestureDetector(
|
|
|
- onTap: () {
|
|
|
- controller.onAddFriendClick();
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 16.w, left: 8.w),
|
|
|
- child: Assets.images.iconMainAddFriend
|
|
|
- .image(width: 60.w, height: 60.w)),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
+ Widget buildMapLogoView() {
|
|
|
+ return Visibility(
|
|
|
+ visible: Platform.isAndroid,
|
|
|
+ child: Obx(() {
|
|
|
+ return Positioned(
|
|
|
+ left: 12.w,
|
|
|
+ bottom: 136.w +
|
|
|
+ (controller.lastSelectedGoods != null ? 64.w : 0) +
|
|
|
+ controller.sheetProgress * 143.w,
|
|
|
+ child: Column(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
+ children: [
|
|
|
+ Assets.images.iconAmapLogo.image(height: 20.w),
|
|
|
+ Text(StringName.locationAmapCo,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 9.sp, color: '#666666'.color, height: 1))
|
|
|
+ ],
|
|
|
+ ));
|
|
|
+ }),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
Widget buildMapFunView() {
|
|
|
return Obx(() {
|
|
|
return Positioned(
|
|
|
- right: 0.w,
|
|
|
- bottom: controller.lastSelectedGoods == null ? 140.w : 180.w,
|
|
|
+ right: 12.w,
|
|
|
+ bottom: 110.w +
|
|
|
+ (controller.lastSelectedGoods != null ? 64.w : 0) +
|
|
|
+ controller.sheetProgress * 143.w,
|
|
|
child: Column(
|
|
|
children: [
|
|
|
GestureDetector(
|
|
|
onTap: controller.onRefreshFriendLocationClick,
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 12.w),
|
|
|
- child: Assets.images.iconMainRefreshFriendLocation
|
|
|
- .image(width: 42.w, height: 42.w)),
|
|
|
+ child: buildMainFunctionView(
|
|
|
+ Assets.images.iconMainRefresh.provider(), '',
|
|
|
+ onTap: controller.onRefreshFriendLocationClick),
|
|
|
),
|
|
|
- SizedBox(height: 14.w),
|
|
|
+ SizedBox(height: 20.w),
|
|
|
GestureDetector(
|
|
|
onTap: controller.onCurrentLocationClick,
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 12.w),
|
|
|
- child: Assets.images.iconMainRefreshMineLocation
|
|
|
- .image(width: 42.w, height: 42.w)),
|
|
|
+ child: buildMainFunctionView(
|
|
|
+ Assets.images.iconMainLocation.provider(), '',
|
|
|
+ onTap: controller.onCurrentLocationClick),
|
|
|
),
|
|
|
SizedBox(height: 20.w)
|
|
|
],
|
|
|
@@ -368,63 +415,6 @@ class MainPage extends BasePage<MainController> {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- Container buildTabContainer() {
|
|
|
- return Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.only(
|
|
|
- topLeft: Radius.circular(20.w),
|
|
|
- topRight: Radius.circular(20.w),
|
|
|
- ),
|
|
|
- boxShadow: [
|
|
|
- BoxShadow(
|
|
|
- color: ColorName.black.withOpacity(0.01),
|
|
|
- blurRadius: 10,
|
|
|
- offset: const Offset(0, -2), // changes position of shadow
|
|
|
- ),
|
|
|
- ],
|
|
|
- ),
|
|
|
- padding: EdgeInsets.only(top: 13.w, bottom: 23.w),
|
|
|
- child: buildMainFunList());
|
|
|
- }
|
|
|
-
|
|
|
- Widget buildMainFunList() {
|
|
|
- return Row(
|
|
|
- children: [
|
|
|
- Expanded(
|
|
|
- child: buildFunItem(
|
|
|
- Platform.isIOS
|
|
|
- ? Assets.images.iconMainFriendGuard.provider()
|
|
|
- : Assets.images.iconMainFriendGuardAndroid.provider(),
|
|
|
- StringName.mainFriendListTab,
|
|
|
- () => controller.onFriendClick())),
|
|
|
- Expanded(child: Obx(() {
|
|
|
- return buildFunItem(
|
|
|
- Platform.isIOS
|
|
|
- ? Assets.images.iconMainNews.provider()
|
|
|
- : Assets.images.iconMainNewsAndroid.provider(),
|
|
|
- StringName.mainNewsTab,
|
|
|
- () => controller.onNewsClick(),
|
|
|
- isShowDot: controller.hasUnreadMessage);
|
|
|
- })),
|
|
|
- Expanded(
|
|
|
- child: buildFunItem(
|
|
|
- Platform.isIOS
|
|
|
- ? Assets.images.iconMainHelp.provider()
|
|
|
- : Assets.images.iconMainHelpAndroid.provider(),
|
|
|
- StringName.mainHelpTab,
|
|
|
- () => controller.onUrgentContactClick())),
|
|
|
- Expanded(
|
|
|
- child: buildFunItem(
|
|
|
- Platform.isIOS
|
|
|
- ? Assets.images.iconMainMine.provider()
|
|
|
- : Assets.images.iconMainMineAndroid.provider(),
|
|
|
- StringName.mainMineTab,
|
|
|
- () => controller.onMineClick()))
|
|
|
- ],
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
Widget buildFunItem(ImageProvider imgProvider, String title, Function() onTap,
|
|
|
{bool? isShowDot}) {
|
|
|
return GestureDetector(
|
|
|
@@ -462,100 +452,136 @@ class MainPage extends BasePage<MainController> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- Widget buildMainFriendList() {
|
|
|
- return SizedBox(
|
|
|
- height: 58.w,
|
|
|
- child: Obx(() {
|
|
|
- return ListView(
|
|
|
- physics: const BouncingScrollPhysics(
|
|
|
- parent: AlwaysScrollableScrollPhysics()),
|
|
|
- padding: EdgeInsets.only(left: 12.w),
|
|
|
- scrollDirection: Axis.horizontal,
|
|
|
- children: [
|
|
|
- for (UserInfo userInfo in controller.integrateList)
|
|
|
- Obx(() {
|
|
|
- return mainFriendItem(
|
|
|
- userInfo, controller.selectedFriend?.id == userInfo.id,
|
|
|
- onTap: () {
|
|
|
- controller.onSelectUserClick(userInfo);
|
|
|
- });
|
|
|
- })
|
|
|
- ],
|
|
|
- );
|
|
|
- }),
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- Widget buildFooterBuilder(BuildContext context, SheetState state) {
|
|
|
- return buildTabContainer();
|
|
|
- }
|
|
|
-
|
|
|
Widget buildHeaderBuilder(BuildContext context, SheetState state) {
|
|
|
return buildHeaderView(false);
|
|
|
}
|
|
|
|
|
|
Widget buildHeaderView(bool isShowActivity) {
|
|
|
return IntrinsicHeight(
|
|
|
- child: Stack(
|
|
|
- alignment: Alignment.topCenter,
|
|
|
- children: [
|
|
|
- Visibility(
|
|
|
- visible: isShowActivity,
|
|
|
- child: Assets.images.bgMemberActivityMain
|
|
|
- .image(width: 336.w, height: 67.w),
|
|
|
- ),
|
|
|
- Visibility(visible: isShowActivity, child: buildActivityMemberView()),
|
|
|
- Column(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Visibility(visible: isShowActivity, child: buildActivityMemberView()),
|
|
|
+ buildSelectFriendPlateView()
|
|
|
+ ],
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget buildSelectFriendPlateView() {
|
|
|
+ return Container(
|
|
|
+ width: double.infinity,
|
|
|
+ padding: EdgeInsets.only(left: 1.5.w, top: 1.5.w, right: 1.5.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(12.r), topRight: Radius.circular(12.r)),
|
|
|
+ gradient: LinearGradient(
|
|
|
+ begin: Alignment.topCenter,
|
|
|
+ end: Alignment.bottomCenter,
|
|
|
+ colors: [
|
|
|
+ Colors.white,
|
|
|
+ '#EFF4FC'.color,
|
|
|
+ ])),
|
|
|
+ child: Container(
|
|
|
+ width: double.infinity,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#EFF4FC'.color,
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(12.w),
|
|
|
+ topRight: Radius.circular(12.w))),
|
|
|
+ child: Column(
|
|
|
children: [
|
|
|
- Visibility(
|
|
|
- visible: isShowActivity, child: SizedBox(height: 58.w)),
|
|
|
+ SizedBox(height: 7.h),
|
|
|
Container(
|
|
|
- width: double.infinity,
|
|
|
+ width: 24.w,
|
|
|
+ height: 3.h,
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#CDE0FF'.color,
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(49.w))),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 5.h),
|
|
|
+ buildFriendPlateListView(),
|
|
|
+ SizedBox(height: 12.h)
|
|
|
+ ],
|
|
|
+ )),
|
|
|
+ );
|
|
|
+ }
|
|
|
+
|
|
|
+ Widget buildFriendPlateListView() {
|
|
|
+ return SizedBox(
|
|
|
+ width: double.infinity,
|
|
|
+ height: 68.h,
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ Expanded(child: Obx(() {
|
|
|
+ return PageView.builder(
|
|
|
+ controller: controller.pageController,
|
|
|
+ onPageChanged: controller.onFriendPageChanged,
|
|
|
+ physics: const BouncingScrollPhysics(),
|
|
|
+ itemBuilder: (ctx, index) =>
|
|
|
+ _buildFriendListItem(controller.integrateList[index]),
|
|
|
+ itemCount: controller.integrateList.length);
|
|
|
+ })),
|
|
|
+ Obx(() {
|
|
|
+ return Visibility(
|
|
|
+ visible: controller.friendsList.isNotEmpty,
|
|
|
+ child: Container(
|
|
|
+ padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 6.w),
|
|
|
decoration: BoxDecoration(
|
|
|
- color: '#F9F9F9'.color,
|
|
|
+ color: Colors.white,
|
|
|
borderRadius: BorderRadius.only(
|
|
|
- topLeft: Radius.circular(20.w),
|
|
|
- topRight: Radius.circular(20.w),
|
|
|
- ),
|
|
|
- boxShadow: [
|
|
|
- BoxShadow(
|
|
|
- color: ColorName.black.withOpacity(0.01),
|
|
|
- blurRadius: 10,
|
|
|
- offset: const Offset(0, -2), // changes position of shadow
|
|
|
- ),
|
|
|
- ],
|
|
|
+ topLeft: Radius.circular(10.r),
|
|
|
+ bottomLeft: Radius.circular(10.r)),
|
|
|
),
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- SizedBox(height: 5.w),
|
|
|
- Container(
|
|
|
- width: 32.w,
|
|
|
- height: 3.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: '#D9D9D9'.color,
|
|
|
- borderRadius:
|
|
|
- BorderRadius.all(Radius.circular(49.w))),
|
|
|
- ),
|
|
|
- SizedBox(height: 12.w),
|
|
|
- buildSelectFriendInfoView(),
|
|
|
- SizedBox(height: 13.w)
|
|
|
- ],
|
|
|
+ child: IntrinsicHeight(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Text(StringName.mainLeftSlipSwitch,
|
|
|
+ style: TextStyle(
|
|
|
+ fontSize: 8.sp,
|
|
|
+ color: ColorName.colorPrimary,
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
+ SizedBox(height: 2.w),
|
|
|
+ Assets.images.iconMainLeftSlipArrow
|
|
|
+ .image(width: 5.w, height: 5.w)
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- )
|
|
|
- ],
|
|
|
- )
|
|
|
+ ),
|
|
|
+ );
|
|
|
+ })
|
|
|
],
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ Widget _buildFriendListItem(UserInfo userInfo) {
|
|
|
+ return Obx(() {
|
|
|
+ return Padding(
|
|
|
+ padding: EdgeInsets.only(
|
|
|
+ left: 12.w, right: controller.friendsList.isNotEmpty ? 8.w : 12.w),
|
|
|
+ child: buildSelectFriendInfoView(userInfo, controller.memberStatusInfo,
|
|
|
+ onTraceClick: controller.onViewTraceClick),
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
Widget buildActivityMemberView() {
|
|
|
return GestureDetector(
|
|
|
behavior: HitTestBehavior.opaque,
|
|
|
onTap: controller.onBuyMemberActivityClick,
|
|
|
child: Container(
|
|
|
- height: 58.w,
|
|
|
- margin: EdgeInsets.only(left: 12.w, right: 12.w),
|
|
|
+ height: 56.w,
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 8.w),
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ borderRadius: BorderRadius.all(Radius.circular(12.r)),
|
|
|
+ gradient: LinearGradient(
|
|
|
+ colors: [
|
|
|
+ '#FFEEE9'.color,
|
|
|
+ Colors.white,
|
|
|
+ ],
|
|
|
+ stops: [0.0, 0.8],
|
|
|
+ begin: Alignment.topCenter,
|
|
|
+ end: Alignment.bottomCenter,
|
|
|
+ )),
|
|
|
child: ShimmerEffect(
|
|
|
image: Assets.images.imgMemberBtnShadow.provider(),
|
|
|
child: Stack(
|
|
|
@@ -575,38 +601,39 @@ class MainPage extends BasePage<MainController> {
|
|
|
Text('您有一订单未支付专属优惠券',
|
|
|
style: TextStyle(
|
|
|
fontSize: 10.sp,
|
|
|
- color: ColorName.white87,
|
|
|
+ color: '#202020'.color,
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
Obx(() {
|
|
|
return Text(
|
|
|
' -¥${(((controller.lastSelectedGoods?.originalAmount ?? 0) - (controller.lastSelectedGoods?.amount ?? 0)) / 100).toInt()}',
|
|
|
style: TextStyle(
|
|
|
fontSize: 20.sp,
|
|
|
- color: '#E7DBA7'.color,
|
|
|
+ color: '#E74E4E'.color,
|
|
|
fontWeight: FontWeight.bold));
|
|
|
})
|
|
|
],
|
|
|
),
|
|
|
Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
|
Obx(() {
|
|
|
return ActivityCountdownTextView(
|
|
|
timeItemHeight: 15.w,
|
|
|
- contentPadding: EdgeInsets.zero,
|
|
|
- timeItemWidth: 16.w,
|
|
|
+ contentPadding:
|
|
|
+ EdgeInsets.symmetric(horizontal: 2.w),
|
|
|
textStyle: TextStyle(
|
|
|
- fontSize: 10.sp, color: '#322C54'.color),
|
|
|
+ fontSize: 11.sp,
|
|
|
+ color: '#E74F4F'.color,
|
|
|
+ fontWeight: FontWeight.w500,
|
|
|
+ ),
|
|
|
duration: controller.activityDuration ??
|
|
|
Duration(seconds: 0),
|
|
|
separator: buildCountdownSeparator(),
|
|
|
timeBgBoxDecoration: BoxDecoration(
|
|
|
- gradient: LinearGradient(
|
|
|
- colors: [
|
|
|
- ColorName.white,
|
|
|
- ColorName.white87
|
|
|
- ],
|
|
|
- begin: Alignment.topCenter,
|
|
|
- end: Alignment.bottomCenter),
|
|
|
+ gradient: LinearGradient(colors: [
|
|
|
+ '#FFEFEF'.color,
|
|
|
+ '#FFEFEF'.color,
|
|
|
+ ]),
|
|
|
borderRadius: BorderRadius.circular(3.w),
|
|
|
));
|
|
|
}),
|
|
|
@@ -614,9 +641,9 @@ class MainPage extends BasePage<MainController> {
|
|
|
Text(
|
|
|
StringName.memberActivitySpeciallyPreferential,
|
|
|
style: TextStyle(
|
|
|
- fontSize: 10.sp,
|
|
|
- color: ColorName.white87,
|
|
|
- fontWeight: FontWeight.bold),
|
|
|
+ fontSize: 10.sp,
|
|
|
+ color: '#202020'.color,
|
|
|
+ ),
|
|
|
)
|
|
|
],
|
|
|
),
|
|
|
@@ -631,21 +658,21 @@ class MainPage extends BasePage<MainController> {
|
|
|
right: 10.w,
|
|
|
child: Container(
|
|
|
decoration: BoxDecoration(
|
|
|
- borderRadius: BorderRadius.circular(100.w),
|
|
|
+ borderRadius: BorderRadius.circular(8.w),
|
|
|
gradient: LinearGradient(
|
|
|
- colors: [
|
|
|
- '#FFFEF3'.color,
|
|
|
- '#FFE5A3'.color,
|
|
|
- ],
|
|
|
- begin: Alignment.topCenter,
|
|
|
- end: Alignment.bottomCenter),
|
|
|
+ colors: [
|
|
|
+ '#FA6565'.color,
|
|
|
+ '#D565FA'.color,
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- padding: EdgeInsets.symmetric(horizontal: 12.w),
|
|
|
+ padding:
|
|
|
+ EdgeInsets.symmetric(horizontal: 14.w, vertical: 7.w),
|
|
|
child: Center(
|
|
|
child: Text(StringName.memberActivityToBuy,
|
|
|
style: TextStyle(
|
|
|
- fontSize: 14.sp,
|
|
|
- color: '#40338B'.color,
|
|
|
+ fontSize: 12.sp,
|
|
|
+ color: Colors.white,
|
|
|
height: 1,
|
|
|
fontWeight: FontWeight.bold)),
|
|
|
)),
|
|
|
@@ -666,7 +693,7 @@ class MainPage extends BasePage<MainController> {
|
|
|
width: 2.w,
|
|
|
height: 2.w,
|
|
|
decoration: BoxDecoration(
|
|
|
- color: ColorName.white87,
|
|
|
+ color: '#E74F4F'.color,
|
|
|
shape: BoxShape.circle,
|
|
|
),
|
|
|
),
|
|
|
@@ -675,7 +702,7 @@ class MainPage extends BasePage<MainController> {
|
|
|
width: 2.w,
|
|
|
height: 2.w,
|
|
|
decoration: BoxDecoration(
|
|
|
- color: ColorName.white87,
|
|
|
+ color: '#E74F4F'.color,
|
|
|
shape: BoxShape.circle,
|
|
|
),
|
|
|
)
|
|
|
@@ -684,123 +711,4 @@ class MainPage extends BasePage<MainController> {
|
|
|
),
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
- Widget buildSelectFriendInfoView() {
|
|
|
- return Container(
|
|
|
- width: 336.w,
|
|
|
- height: 86.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: ColorName.white,
|
|
|
- borderRadius: BorderRadius.all(Radius.circular(20.w))),
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- SizedBox(width: 7.w),
|
|
|
- Obx(() {
|
|
|
- return buildCustomAvatarOrDefaultAvatarView(
|
|
|
- size: 50.w,
|
|
|
- avatar: controller.selectedFriend?.avatar,
|
|
|
- isMine: controller.selectedFriend?.isMine == true);
|
|
|
- }),
|
|
|
- SizedBox(width: 5.w),
|
|
|
- Expanded(
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.symmetric(vertical: 15.w),
|
|
|
- child: Column(
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
- children: [
|
|
|
- Row(
|
|
|
- children: [
|
|
|
- Obx(() {
|
|
|
- return ConstrainedBox(
|
|
|
- constraints: BoxConstraints(
|
|
|
- maxWidth: 0.26.sw,
|
|
|
- ),
|
|
|
- child: Text(
|
|
|
- maxLines: 1,
|
|
|
- controller.selectedFriend?.getUserNickName() ??
|
|
|
- '',
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- style: TextStyle(
|
|
|
- fontWeight: FontWeight.bold,
|
|
|
- fontSize: 16.sp,
|
|
|
- color: '#202020'.color),
|
|
|
- ),
|
|
|
- );
|
|
|
- }),
|
|
|
- SizedBox(width: 7.w),
|
|
|
- Obx(() {
|
|
|
- return RelativeTimeText(
|
|
|
- timestamp: controller.selectedFriend?.lastLocation
|
|
|
- .value?.lastUpdateTime,
|
|
|
- updateInterval: Duration(minutes: 1),
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 12.sp, color: '#A7A7A7'.color));
|
|
|
- }),
|
|
|
- Spacer(),
|
|
|
- Obx(() {
|
|
|
- return controller.selectedFriend != null
|
|
|
- ? GestureDetector(
|
|
|
- onTap: () => controller.onViewTraceClick(
|
|
|
- controller.selectedFriend!),
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 12.w),
|
|
|
- decoration: getPrimaryBtnDecoration(32.w),
|
|
|
- padding: EdgeInsets.symmetric(
|
|
|
- horizontal: 21.w, vertical: 5.w),
|
|
|
- child: Text(StringName.locationTrace,
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 15.sp,
|
|
|
- color: Colors.white))),
|
|
|
- )
|
|
|
- : SizedBox.shrink();
|
|
|
- }),
|
|
|
- ],
|
|
|
- ),
|
|
|
- Expanded(
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 17.w),
|
|
|
- child: Obx(() {
|
|
|
- return ImageFiltered(
|
|
|
- enabled: controller.selectedFriend?.blockedMe ==
|
|
|
- true ||
|
|
|
- ((controller.memberStatusInfo.value == null ||
|
|
|
- controller.memberStatusInfo.value
|
|
|
- ?.expired ==
|
|
|
- true) &&
|
|
|
- !(controller.selectedFriend?.isMine ==
|
|
|
- true)),
|
|
|
- imageFilter: ImageFilter.blur(
|
|
|
- sigmaX: Constants.blurredX,
|
|
|
- sigmaY: Constants.blurredY,
|
|
|
- ),
|
|
|
- child: controller.selectedFriend?.blockedMe == true ||
|
|
|
- ((controller.memberStatusInfo.value == null ||
|
|
|
- controller.memberStatusInfo.value?.expired ==
|
|
|
- true) &&
|
|
|
- !(controller.selectedFriend?.isMine ==
|
|
|
- true))
|
|
|
- ? Text(addressCheck(controller.selectedFriend?.lastLocation.value?.address),
|
|
|
- style: TextStyle(
|
|
|
- fontSize: 13.sp,
|
|
|
- color: ColorName.black50))
|
|
|
- : MarqueeText.marquee(
|
|
|
- text: addressCheck(controller.selectedFriend
|
|
|
- ?.lastLocation.value?.address),
|
|
|
- textStyle: TextStyle(
|
|
|
- fontSize: 13.sp,
|
|
|
- color: ColorName.black50),
|
|
|
- containerWidth: 244.w),
|
|
|
- );
|
|
|
- }),
|
|
|
- ),
|
|
|
- )
|
|
|
- // Text('广东省广州市天河区XX街街XX街区XX村XX')
|
|
|
- ],
|
|
|
- ),
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ));
|
|
|
- }
|
|
|
}
|