|
@@ -6,6 +6,7 @@ import 'package:get/get.dart';
|
|
|
import 'package:location/base/base_page.dart';
|
|
import 'package:location/base/base_page.dart';
|
|
|
import 'package:location/data/bean/user_info.dart';
|
|
import 'package:location/data/bean/user_info.dart';
|
|
|
import 'package:location/module/main/main_controller.dart';
|
|
import 'package:location/module/main/main_controller.dart';
|
|
|
|
|
+import 'package:location/module/main/view.dart';
|
|
|
import 'package:location/resource/assets.gen.dart';
|
|
import 'package:location/resource/assets.gen.dart';
|
|
|
import 'package:location/resource/colors.gen.dart';
|
|
import 'package:location/resource/colors.gen.dart';
|
|
|
import 'package:location/resource/string.gen.dart';
|
|
import 'package:location/resource/string.gen.dart';
|
|
@@ -77,17 +78,6 @@ class MainPage extends BasePage<MainController> {
|
|
|
// the total available space that the sheet can expand to.
|
|
// the total available space that the sheet can expand to.
|
|
|
positioning: SnapPositioning.relativeToAvailableSpace,
|
|
positioning: SnapPositioning.relativeToAvailableSpace,
|
|
|
),
|
|
),
|
|
|
- // headerBuilder: (context, state) {
|
|
|
|
|
- // return Container(
|
|
|
|
|
- // height: 56,
|
|
|
|
|
- // width: double.infinity,
|
|
|
|
|
- // color: Colors.green,
|
|
|
|
|
- // alignment: Alignment.center,
|
|
|
|
|
- // child: Text(
|
|
|
|
|
- // 'This is the header',
|
|
|
|
|
- // ),
|
|
|
|
|
- // );
|
|
|
|
|
- // },
|
|
|
|
|
footerBuilder: buildFooterBuilder,
|
|
footerBuilder: buildFooterBuilder,
|
|
|
headerBuilder: buildHeaderBuilder,
|
|
headerBuilder: buildHeaderBuilder,
|
|
|
builder: buildTrackEntranceBuilder,
|
|
builder: buildTrackEntranceBuilder,
|
|
@@ -96,8 +86,76 @@ class MainPage extends BasePage<MainController> {
|
|
|
|
|
|
|
|
Widget buildTrackEntranceBuilder(BuildContext context, SheetState state) {
|
|
Widget buildTrackEntranceBuilder(BuildContext context, SheetState state) {
|
|
|
return Container(
|
|
return Container(
|
|
|
- height: 200.w,
|
|
|
|
|
- width: 1.sw,
|
|
|
|
|
|
|
+ margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 12.w),
|
|
|
|
|
+ padding: EdgeInsets.only(left: 12.w, right: 12.w, top: 12.w, bottom: 9.w),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
|
|
|
|
|
+ child: AspectRatio(
|
|
|
|
|
+ aspectRatio: 336 / 134,
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(StringName.todaySimpleTrack,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ fontSize: 13.sp,
|
|
|
|
|
+ color: '#333333'.color,
|
|
|
|
|
+ fontWeight: FontWeight.bold)),
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ Assets.images.iconMainTrackArrow
|
|
|
|
|
+ .image(width: 10.w, height: 10.w),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ SizedBox(height: 7.w),
|
|
|
|
|
+ Expanded(
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Container(
|
|
|
|
|
+ margin: EdgeInsets.only(bottom: 3.w, top: 3.w),
|
|
|
|
|
+ child: AspectRatio(
|
|
|
|
|
+ aspectRatio: 1,
|
|
|
|
|
+ child: Assets.images.imgTrackExample.image(),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ SizedBox(width: 10.w),
|
|
|
|
|
+ Column(
|
|
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ SizedBox(height: 6.w),
|
|
|
|
|
+ getMainTrackDot('#15CBA1'.color),
|
|
|
|
|
+ Expanded(
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ margin: EdgeInsets.symmetric(vertical: 4.w),
|
|
|
|
|
+ width: 1.w,
|
|
|
|
|
+ height: double.infinity,
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: '#F0F0F0'.color,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(100.r),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ getMainTrackDot('#E94949'.color),
|
|
|
|
|
+ SizedBox(height: 6.w),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ SizedBox(width: 8.w),
|
|
|
|
|
+ Expanded(
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ buildTrackPoint(MainTrackType.startPoint,
|
|
|
|
|
+ '广东省广州市天河区高唐路235号靠近C栋2楼时代E-PARK'),
|
|
|
|
|
+ Spacer(),
|
|
|
|
|
+ buildTrackPoint(
|
|
|
|
|
+ MainTrackType.errorPoint, '广东省广州市海珠区滨江东路驾驶花园C栋601'),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ )
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
|
|
|