|
|
@@ -33,113 +33,120 @@ class MainPage extends BasePage<MainController> {
|
|
|
|
|
|
@override
|
|
|
Widget buildBody(BuildContext context) {
|
|
|
- return Stack(
|
|
|
- children: [
|
|
|
- Padding(
|
|
|
- padding: EdgeInsets.only(bottom: 50.h),
|
|
|
- child: SizedBox(
|
|
|
- width: double.infinity,
|
|
|
- child: MapWidget(
|
|
|
- controller: controller.mapController,
|
|
|
- onMarkerTap: controller.onMarkerTap,
|
|
|
- )),
|
|
|
- ),
|
|
|
- Align(
|
|
|
- alignment: Alignment.bottomCenter,
|
|
|
- child: IntrinsicHeight(
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- Row(
|
|
|
- crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: [
|
|
|
- Visibility(
|
|
|
- visible: false,
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(bottom: 24.w, left: 12.w),
|
|
|
- child: Assets.images.iconMainMapClock
|
|
|
- .image(width: 50.w)),
|
|
|
- ),
|
|
|
- Align(
|
|
|
- alignment: Alignment.bottomRight,
|
|
|
- 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)),
|
|
|
- ),
|
|
|
- SizedBox(height: 14.w),
|
|
|
- GestureDetector(
|
|
|
- onTap: controller.onCurrentLocationClick,
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 12.w),
|
|
|
- child: Assets.images.iconMainRefreshMineLocation
|
|
|
- .image(width: 42.w, height: 42.w)),
|
|
|
- ),
|
|
|
- SizedBox(height: 20.w)
|
|
|
- ],
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
- ),
|
|
|
- Container(
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: '#F9F9F9'.color,
|
|
|
- borderRadius: BorderRadius.only(
|
|
|
- topLeft: Radius.circular(20.w),
|
|
|
- topRight: Radius.circular(20.w),
|
|
|
- ),
|
|
|
- ),
|
|
|
- child: Column(
|
|
|
+ return PopScope(
|
|
|
+ canPop: false,
|
|
|
+ onPopInvokedWithResult: (bool didPop, dynamic result) {
|
|
|
+ controller.onAppBack();
|
|
|
+ },
|
|
|
+ child: Stack(
|
|
|
+ children: [
|
|
|
+ Padding(
|
|
|
+ padding: EdgeInsets.only(bottom: 50.h),
|
|
|
+ child: SizedBox(
|
|
|
+ width: double.infinity,
|
|
|
+ child: MapWidget(
|
|
|
+ controller: controller.mapController,
|
|
|
+ onMarkerTap: controller.onMarkerTap,
|
|
|
+ )),
|
|
|
+ ),
|
|
|
+ Align(
|
|
|
+ alignment: Alignment.bottomCenter,
|
|
|
+ child: IntrinsicHeight(
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
children: [
|
|
|
- SizedBox(height: 5.w),
|
|
|
- Container(
|
|
|
- width: 32.w,
|
|
|
- height: 3.w,
|
|
|
- decoration: BoxDecoration(
|
|
|
- color: '#D9D9D9'.color,
|
|
|
- borderRadius:
|
|
|
- BorderRadius.all(Radius.circular(49.w))),
|
|
|
+ Visibility(
|
|
|
+ visible: false,
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(bottom: 24.w, left: 12.w),
|
|
|
+ child: Assets.images.iconMainMapClock
|
|
|
+ .image(width: 50.w)),
|
|
|
),
|
|
|
- SizedBox(height: 12.w),
|
|
|
- buildSelectFriendInfoView(),
|
|
|
- Obx(() {
|
|
|
- return Visibility(
|
|
|
- visible: controller.selectedFriend != null,
|
|
|
- child: SizedBox(height: 13.w));
|
|
|
- }),
|
|
|
- buildTabContainer()
|
|
|
+ Align(
|
|
|
+ alignment: Alignment.bottomRight,
|
|
|
+ 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)),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 14.w),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: controller.onCurrentLocationClick,
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(right: 12.w),
|
|
|
+ child: Assets
|
|
|
+ .images.iconMainRefreshMineLocation
|
|
|
+ .image(width: 42.w, height: 42.w)),
|
|
|
+ ),
|
|
|
+ SizedBox(height: 20.w)
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
],
|
|
|
),
|
|
|
- )
|
|
|
- ],
|
|
|
+ Container(
|
|
|
+ decoration: BoxDecoration(
|
|
|
+ color: '#F9F9F9'.color,
|
|
|
+ borderRadius: BorderRadius.only(
|
|
|
+ topLeft: Radius.circular(20.w),
|
|
|
+ topRight: Radius.circular(20.w),
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ 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(),
|
|
|
+ Obx(() {
|
|
|
+ return Visibility(
|
|
|
+ visible: controller.selectedFriend != null,
|
|
|
+ child: SizedBox(height: 13.w));
|
|
|
+ }),
|
|
|
+ buildTabContainer()
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- 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)),
|
|
|
- )
|
|
|
- ],
|
|
|
+ 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)),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
- )
|
|
|
- ],
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@@ -170,7 +177,8 @@ class MainPage extends BasePage<MainController> {
|
|
|
isShowDot: controller.waitingNewsCount > 0);
|
|
|
})),
|
|
|
Expanded(
|
|
|
- child: buildFunItem(Assets.images.iconMainHelp.provider(),
|
|
|
+ child: buildFunItem(
|
|
|
+ Assets.images.iconMainHelp.provider(),
|
|
|
StringName.mainHelpTab,
|
|
|
() => controller.onUrgentContactClick())),
|
|
|
Expanded(
|