|
|
@ -1,5 +1,7 @@ |
|
|
|
|
|
import 'package:dating_touchme_app/controller/global.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
import 'package:dating_touchme_app/generated/assets.dart'; |
|
|
|
|
|
import 'package:dating_touchme_app/network/user_api.dart'; |
|
|
import 'package:dating_touchme_app/pages/home/send_timeline.dart'; |
|
|
import 'package:dating_touchme_app/pages/home/send_timeline.dart'; |
|
|
import 'package:dating_touchme_app/pages/main/main_controller.dart'; |
|
|
import 'package:dating_touchme_app/pages/main/main_controller.dart'; |
|
|
import 'package:dating_touchme_app/pages/message/message_page.dart'; |
|
|
import 'package:dating_touchme_app/pages/message/message_page.dart'; |
|
|
@ -66,6 +68,9 @@ class _MainPageState extends State<MainPage> { |
|
|
if(userId != null && userId.isNotEmpty){ |
|
|
if(userId != null && userId.isNotEmpty){ |
|
|
await userController.getBaseUserInfo(userId, true); |
|
|
await userController.getBaseUserInfo(userId, true); |
|
|
} |
|
|
} |
|
|
|
|
|
setState(() { |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
initRTM() async { |
|
|
initRTM() async { |
|
|
@ -91,7 +96,7 @@ class _MainPageState extends State<MainPage> { |
|
|
minePage, |
|
|
minePage, |
|
|
], |
|
|
], |
|
|
), |
|
|
), |
|
|
bottomNavigationBar: Stack( |
|
|
|
|
|
|
|
|
bottomNavigationBar: GlobalData().userData != null ? Stack( |
|
|
clipBehavior: Clip.none, |
|
|
clipBehavior: Clip.none, |
|
|
children: [ |
|
|
children: [ |
|
|
_buildBottomNavigationBar(), |
|
|
_buildBottomNavigationBar(), |
|
|
@ -108,7 +113,7 @@ class _MainPageState extends State<MainPage> { |
|
|
}), |
|
|
}), |
|
|
) |
|
|
) |
|
|
], |
|
|
], |
|
|
), |
|
|
|
|
|
|
|
|
) : null, |
|
|
), |
|
|
), |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
@ -171,7 +176,9 @@ class _MainPageState extends State<MainPage> { |
|
|
currentIndex = index; |
|
|
currentIndex = index; |
|
|
pageController.jumpToPage(index); |
|
|
pageController.jumpToPage(index); |
|
|
if(index == 3){ |
|
|
if(index == 3){ |
|
|
pageBKey.currentState?.getUserCount(); |
|
|
|
|
|
|
|
|
if (Get.isRegistered<UserApi>()) { |
|
|
|
|
|
pageBKey.currentState?.getUserCount(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
); |
|
|
); |
|
|
|