From cbc3ca23484db3f662aa185819cc2ebb69965aad Mon Sep 17 00:00:00 2001 From: datang Date: Thu, 2 Jun 2022 14:14:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E4=BA=8B=E6=8A=A5=E4=BF=AEtab?= =?UTF-8?q?=E5=B0=8F=E5=B0=BA=E5=AF=B8=E6=89=8B=E6=9C=BA=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=AE=8C=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/home/home_page.dart | 85 ++++++++++--------- .../work_order/work_order_page.dart | 1 + lib/widget/tab_bar/bee_tab_bar.dart | 1 + 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart index 8930da44..20492ac9 100644 --- a/lib/pages/home/home_page.dart +++ b/lib/pages/home/home_page.dart @@ -110,44 +110,46 @@ class _HomePageState extends State right: 32.w, left: 32.w, bottom: 20.w), - child: Row(crossAxisAlignment: CrossAxisAlignment.center, children: [ - // if (appProvider.location != null) - Image.asset( - Assets.home.icLocation.path, - width: 48.w, - height: 48.w, - ), - 16.wb, - Text( - '${UserTool.userProvider.userInfoModel?.communityName ?? ""}', - // appProvider.location?['city'] == null - // ? '' - // : appProvider.location?['city'] as String? ?? '', - style: TextStyle( - fontWeight: FontWeight.w600, - fontSize: 28.sp, - color: Color(0xff333333), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + // if (appProvider.location != null) + Image.asset( + Assets.home.icLocation.path, + width: 48.w, + height: 48.w, ), - textAlign: TextAlign.center, - ), - // Text( - // '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)', - // style: TextStyle( - // fontSize: 28.sp, - // color: Color(0xff999999), - // ), - // textAlign: TextAlign.center, - // ), - Spacer(), - // GestureDetector( - // onTap: () { - // Get.to(() => BeeSearch()); - // }, - // child: - // Image.asset(Assets.home.icSearch.path, height: 48.w, width: 48.w), - // ), - 20.wb, - Badge( + 16.wb, + Text( + '${UserTool.userProvider.userInfoModel?.communityName ?? ""}', + // appProvider.location?['city'] == null + // ? '' + // : appProvider.location?['city'] as String? ?? '', + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 28.sp, + color: Color(0xff333333), + ), + textAlign: TextAlign.center, + ), + // Text( + // '(${appProvider.weatherType} ${appProvider.weatherTemp}℃)', + // style: TextStyle( + // fontSize: 28.sp, + // color: Color(0xff999999), + // ), + // textAlign: TextAlign.center, + // ), + Spacer(), + // GestureDetector( + // onTap: () { + // Get.to(() => BeeSearch()); + // }, + // child: + // Image.asset(Assets.home.icSearch.path, height: 48.w, width: 48.w), + // ), + 20.wb, + Badge( elevation: 0, badgeColor: Color(0xFFCF2525), padding: sum > 9 ? EdgeInsets.all(2.w) : EdgeInsets.all(5.w), @@ -168,8 +170,10 @@ class _HomePageState extends State }, child: Image.asset(Assets.home.icMessage.path, height: 48.w, width: 48.w), - )), - ]), + ), + ), + ], + ), ); return AnnotatedRegion( value: SystemUiOverlayStyle.dark, @@ -359,7 +363,8 @@ class _HomePageState extends State ), ), onTap: () async { - Get.to(AdvicePage(type: AdviceType.SUGGESTION)); + Get.to(AdvicePage( + type: AdviceType.SUGGESTION)); }, ), ) diff --git a/lib/ui/function_and_service/work_order/work_order_page.dart b/lib/ui/function_and_service/work_order/work_order_page.dart index 393deb63..811f99ef 100644 --- a/lib/ui/function_and_service/work_order/work_order_page.dart +++ b/lib/ui/function_and_service/work_order/work_order_page.dart @@ -62,6 +62,7 @@ class _WorkOrderPageState extends State appBarBottom: BeeTabBar( tabs: _tabs, controller: _tabController, + scrollable: true, ), body: TabBarView( controller: _tabController, diff --git a/lib/widget/tab_bar/bee_tab_bar.dart b/lib/widget/tab_bar/bee_tab_bar.dart index c1ffb38a..b87bce55 100644 --- a/lib/widget/tab_bar/bee_tab_bar.dart +++ b/lib/widget/tab_bar/bee_tab_bar.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; class BeeTabBar extends StatefulWidget with PreferredSizeWidget { final TabController? controller;