Parcourir la source

全局context

master
ZCM il y a 5 ans
Parent
révision
636b60da59
2 fichiers modifiés avec 1 ajouts et 28 suppressions
  1. +0
    -27
      lib/chat/ChatPage.dart
  2. +1
    -1
      lib/data/constants.dart

+ 0
- 27
lib/chat/ChatPage.dart Voir le fichier

@@ -366,33 +366,6 @@ class _ChatPageState extends State<ChatPage> {
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: <Widget>[
// SizedBox(width: 10),
// CustomUI.buildCustomLeading(context),
// Text(
// Provider.of<RefNameProvider>(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<RefNameProvider>(context).getRefName(friendInfo.userId, friendInfo.nickName)}',


+ 1
- 1
lib/data/constants.dart Voir le fichier

@@ -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';


Chargement…
Annuler
Enregistrer