From 636b60da59479bb4f35daffc7498d82b40ba47fe Mon Sep 17 00:00:00 2001 From: ZCM <772112648@qq.com> Date: Wed, 18 Mar 2020 14:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80context?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/chat/ChatPage.dart | 27 --------------------------- lib/data/constants.dart | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/chat/ChatPage.dart b/lib/chat/ChatPage.dart index 05aa0b2..9ae1bde 100644 --- a/lib/chat/ChatPage.dart +++ b/lib/chat/ChatPage.dart @@ -366,33 +366,6 @@ class _ChatPageState extends State { child: Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFE2E9F1), - // appBar: PreferredSize( - // preferredSize: Size.fromHeight(58), - // child: Container( - // color: AppBarTheme.of(context).color, - // child: SafeArea( - // child: Container( - // height: 56, - // child: Row(children: [ - // SizedBox(width: 10), - // CustomUI.buildCustomLeading(context), - // Text( - // Provider.of(context) - // .getRefName(friendInfo.userId, - // friendInfo.nickName), - // textScaleFactor: 1.0, - // style: TextStyle( - // textBaseline: TextBaseline.ideographic, - // color: Constants.BlackTextColor, - // fontSize: 16.47), - // ), - // Expanded( - // child: Row( - // mainAxisAlignment: - // MainAxisAlignment.end, - // children: actions)) - // ]), - // )))), appBar: AppBar( title: Text( '${Provider.of(context).getRefName(friendInfo.userId, friendInfo.nickName)}', diff --git a/lib/data/constants.dart b/lib/data/constants.dart index 8cc703a..c8d6515 100644 --- a/lib/data/constants.dart +++ b/lib/data/constants.dart @@ -117,7 +117,7 @@ class Constants { static NavigatorState getCurrentState() => navigatorKey.currentState; /// 获取当前的context - static BuildContext getCurrentContext() => navigatorKey.currentContext; + static BuildContext getCurrentContext() => navigatorKey.currentState.overlay.context;//navigatorKey.currentContext; ///在pubspec.yaml中修改版本号 static String versionName = '1.0.0';