From 4b056947f17e96277a6f70a118c56261055e70f1 Mon Sep 17 00:00:00 2001 From: datang Date: Mon, 23 May 2022 17:07:29 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../function_and_service/task/task_page.dart | 42 ++++++++++--------- lib/ui/manager/advice/new_advice_page.dart | 5 ++- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/lib/ui/function_and_service/task/task_page.dart b/lib/ui/function_and_service/task/task_page.dart index ddc6f701..c42d0c70 100644 --- a/lib/ui/function_and_service/task/task_page.dart +++ b/lib/ui/function_and_service/task/task_page.dart @@ -40,6 +40,7 @@ class _TaskPageState extends State with TickerProviderStateMixin { _refreshControllers.forEach((element) { element.dispose(); }); + _tabController.dispose(); super.dispose(); } @@ -71,7 +72,7 @@ class _TaskPageState extends State with TickerProviderStateMixin { children: [ ...TaskMap.taskMode.values .mapIndexed((currentValue, index) => - _tabCard(currentValue, index)) + _tabCard(currentValue, index)) .toList(), ], ), @@ -81,14 +82,17 @@ class _TaskPageState extends State with TickerProviderStateMixin { child: Row( children: ['全部', ...TaskMap.taskType.values] .mapIndexed((currentValue, index) => - _typeBar(currentValue, index)) + _typeBar(currentValue, index)) .toList(), ), ) ], )), body: SafeArea( - child: TabBarView(controller: _tabController, children: [ + child: TabBarView( + physics: const NeverScrollableScrollPhysics(), + controller: _tabController, + children: [ HallView( refreshController: _refreshControllers[0], type: _currentType, @@ -144,23 +148,23 @@ class _TaskPageState extends State with TickerProviderStateMixin { color: Colors.transparent, child: _currentType == index ? Container( - padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(30.w), - color: Color(0xFFFAC058).withOpacity(0.5), - ), - child: text.text - .size(24.sp) - .color(Colors.black.withOpacity(0.65)) - .make(), - ) + padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(30.w), + color: Color(0xFFFAC058).withOpacity(0.5), + ), + child: text.text + .size(24.sp) + .color(Colors.black.withOpacity(0.65)) + .make(), + ) : Container( - padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w), - child: text.text - .size(24.sp) - .color(Colors.black.withOpacity(0.45)) - .make(), - ), + padding: EdgeInsets.symmetric(vertical: 8.w, horizontal: 24.w), + child: text.text + .size(24.sp) + .color(Colors.black.withOpacity(0.45)) + .make(), + ), ), ); } diff --git a/lib/ui/manager/advice/new_advice_page.dart b/lib/ui/manager/advice/new_advice_page.dart index 1017da94..56414a8e 100644 --- a/lib/ui/manager/advice/new_advice_page.dart +++ b/lib/ui/manager/advice/new_advice_page.dart @@ -224,7 +224,10 @@ class _NewAdvicePageState extends State { type = _type == 0 ? 3 : 4; break; } - addAdvice(type, _files, _editingController.text); + if(userProvider.defaultHouse != null){ + addAdvice(type, _files, _editingController.text); + } + BotToast.showText(text: '请选择房屋'); } cancel(); },