|
...
|
...
|
@@ -14,6 +14,7 @@ import 'package:one_key/utils/utils.dart'; |
|
|
|
import 'package:one_key/widgets/app_bar.dart';
|
|
|
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../../utils/screen_util.dart';
|
|
|
|
import 'message_online_page.dart';
|
|
|
|
import 'message_order_page.dart';
|
|
|
|
|
|
...
|
...
|
@@ -45,14 +46,6 @@ class MessagePageState extends State<MessagePage> |
|
|
|
super.initState();
|
|
|
|
tabController = TabController(length: 2, vsync: this);
|
|
|
|
|
|
|
|
tabController.addListener(() {
|
|
|
|
//点击tab时或滑动tab回调一次
|
|
|
|
// if (tabController.index.toDouble() == tabController.animation.value) {
|
|
|
|
// getMessage(index: tabController.index);
|
|
|
|
// selectIndex = tabController.index;
|
|
|
|
setState(() {});
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
|
|
|
// getMessage(index: 0);
|
|
|
|
});
|
|
...
|
...
|
@@ -65,6 +58,14 @@ class MessagePageState extends State<MessagePage> |
|
|
|
messageModel.removeUntreatedMessageByMid(args.toString());
|
|
|
|
messageDialogModel.removeMessage(args.toString());
|
|
|
|
});
|
|
|
|
tabController.addListener(() {
|
|
|
|
//点击tab时或滑动tab回调一次
|
|
|
|
// if (tabController.index.toDouble() == tabController.animation.value) {
|
|
|
|
// getMessage(index: tabController.index);
|
|
|
|
// selectIndex = tabController.index;
|
|
|
|
setState(() {});
|
|
|
|
// }
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//三种分类各自的未读消息数目
|
|
...
|
...
|
@@ -214,8 +215,12 @@ class MessagePageState extends State<MessagePage> |
|
|
|
)),
|
|
|
|
messageModel.allUnNum > 0
|
|
|
|
? Container(
|
|
|
|
width: ScreenUtil().setWidth(36),
|
|
|
|
// width: ScreenUtil().setWidth(36),
|
|
|
|
constraints: BoxConstraints(
|
|
|
|
minWidth: ScreenUtil().setWidth(36)),
|
|
|
|
height: ScreenUtil().setWidth(36),
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: w(4)),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(20)),
|
|
|
|
decoration: BoxDecoration(
|
...
|
...
|
|