|
@@ -107,19 +107,79 @@ class TrackPage extends BasePage<TrackController> {
|
|
|
return GestureDetector(
|
|
return GestureDetector(
|
|
|
onTap: controller.onTrackQueryClick,
|
|
onTap: controller.onTrackQueryClick,
|
|
|
child: Container(
|
|
child: Container(
|
|
|
- width: 322.w,
|
|
|
|
|
- height: 46.w,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 18.w, top: 9.w),
|
|
margin: EdgeInsets.only(bottom: 18.w, top: 9.w),
|
|
|
- decoration: getPrimaryBtnDecoration(46.w),
|
|
|
|
|
- child: Center(
|
|
|
|
|
- child: Obx(() {
|
|
|
|
|
- return Text(
|
|
|
|
|
- controller.currentIndex == 0
|
|
|
|
|
- ? StringName.trackQueryPath
|
|
|
|
|
- : StringName.trackNowLocation,
|
|
|
|
|
- style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
|
|
|
|
- );
|
|
|
|
|
- }),
|
|
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Obx(() {
|
|
|
|
|
+ return GestureDetector(
|
|
|
|
|
+ onTap: controller.onTraceDetailClick,
|
|
|
|
|
+ child: AnimatedOpacity(
|
|
|
|
|
+ opacity: controller.currentIndex == 0 ? 1 : 0,
|
|
|
|
|
+ duration: Duration(milliseconds: 250),
|
|
|
|
|
+ child: AnimatedContainer(
|
|
|
|
|
+ width: controller.currentIndex == 0 &&
|
|
|
|
|
+ controller.isShowTraceDetailBtn
|
|
|
|
|
+ ? 152.w
|
|
|
|
|
+ : 0.w,
|
|
|
|
|
+ height: 46.w,
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: '#147B7DFF'.color,
|
|
|
|
|
+ border:
|
|
|
|
|
+ Border.all(color: ColorName.colorPrimary, width: 1.w),
|
|
|
|
|
+ borderRadius: BorderRadius.circular(46.w),
|
|
|
|
|
+ ),
|
|
|
|
|
+ duration: Duration(milliseconds: 250),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ maxLines: 1,
|
|
|
|
|
+ StringName.traceDetail,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ fontSize: 14.sp, color: ColorName.colorPrimary),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
|
|
+ // Obx(() {
|
|
|
|
|
+ // return Visibility(
|
|
|
|
|
+ // visible: controller.currentIndex == 0 &&
|
|
|
|
|
+ // controller.isShowTraceDetailBtn,
|
|
|
|
|
+ // child: SizedBox(width: 18.w));
|
|
|
|
|
+ // }),
|
|
|
|
|
+ Obx(() {
|
|
|
|
|
+ double width = 152.w;
|
|
|
|
|
+ if (controller.currentIndex == 1) {
|
|
|
|
|
+ width = 322.w;
|
|
|
|
|
+ } else if (controller.isShowTraceDetailBtn) {
|
|
|
|
|
+ width = 152.w;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ width = 322.w;
|
|
|
|
|
+ }
|
|
|
|
|
+ return AnimatedContainer(
|
|
|
|
|
+ margin: EdgeInsets.only(
|
|
|
|
|
+ left: controller.currentIndex == 0 &&
|
|
|
|
|
+ controller.isShowTraceDetailBtn
|
|
|
|
|
+ ? 18.w
|
|
|
|
|
+ : 0),
|
|
|
|
|
+ duration: Duration(milliseconds: 250),
|
|
|
|
|
+ width: width,
|
|
|
|
|
+ height: 46.w,
|
|
|
|
|
+ decoration: getPrimaryBtnDecoration(46.w),
|
|
|
|
|
+ child: Center(
|
|
|
|
|
+ child: Obx(() {
|
|
|
|
|
+ return Text(
|
|
|
|
|
+ controller.currentIndex == 0
|
|
|
|
|
+ ? StringName.trackQueryPath
|
|
|
|
|
+ : StringName.trackNowLocation,
|
|
|
|
|
+ style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ })
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|