|
|
@ -3,6 +3,7 @@ import 'dart:math';
|
|
|
|
|
|
|
|
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
import 'package:akuCommunity/pages/sign/sign_in_page.dart';
|
|
|
|
import 'package:akuCommunity/pages/sign/sign_in_page.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/utils/login_util.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -106,13 +107,7 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
color: Color(0xFFD8D8D8),
|
|
|
|
color: Color(0xFFD8D8D8),
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
onPressed: () {
|
|
|
|
onPressed: () {
|
|
|
|
final userProvider =
|
|
|
|
if (LoginUtil.isNotLogin) return;
|
|
|
|
Provider.of<UserProvider>(context, listen: false);
|
|
|
|
|
|
|
|
if (userProvider.isNotLogin) {
|
|
|
|
|
|
|
|
BotToast.showText(text: '请先登录');
|
|
|
|
|
|
|
|
Get.to(SignInPage());
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BotToast.showAttachedWidget(
|
|
|
|
BotToast.showAttachedWidget(
|
|
|
|
targetContext: context,
|
|
|
|
targetContext: context,
|
|
|
|
preferDirection: PreferDirection.leftCenter,
|
|
|
|
preferDirection: PreferDirection.leftCenter,
|
|
|
@ -322,6 +317,7 @@ class _ChatCardState extends State<ChatCard> {
|
|
|
|
];
|
|
|
|
];
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onSelected: (_) async {
|
|
|
|
onSelected: (_) async {
|
|
|
|
|
|
|
|
if (LoginUtil.isNotLogin) return;
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
VoidCallback cancel = BotToast.showLoading();
|
|
|
|
await Future.delayed(
|
|
|
|
await Future.delayed(
|
|
|
|
Duration(milliseconds: 500 + Random().nextInt(500)));
|
|
|
|
Duration(milliseconds: 500 + Random().nextInt(500)));
|
|
|
|