update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:chat/configs/app_colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
class Themes {
|
||||
static final ThemeData light = ThemeData(
|
||||
@@ -12,6 +13,7 @@ class Themes {
|
||||
color: AppColors.active,
|
||||
),
|
||||
foregroundColor: AppColors.active,
|
||||
systemOverlayStyle: SystemUiOverlayStyle.dark,
|
||||
),
|
||||
|
||||
/// 主色调
|
||||
|
||||
@@ -19,8 +19,8 @@ import 'package:get_storage/get_storage.dart';
|
||||
Future<void> main() async {
|
||||
/// 设置状态栏样式,透明
|
||||
SystemUiOverlayStyle style = const SystemUiOverlayStyle(
|
||||
statusBarColor: AppColors.transparent,
|
||||
systemNavigationBarColor: AppColors.nav,
|
||||
statusBarColor: AppColors.transparent, // 顶部状态栏
|
||||
systemNavigationBarColor: AppColors.nav, // 底部多出来那块
|
||||
);
|
||||
SystemChrome.setSystemUIOverlayStyle(style);
|
||||
|
||||
|
||||
@@ -3,8 +3,11 @@ import 'package:chat/controllers/private_controller.dart';
|
||||
import 'package:chat/models/im/search_user_model.dart';
|
||||
import 'package:chat/providers/user_provider.dart';
|
||||
import 'package:chat/routes/contact_routes.dart';
|
||||
import 'package:chat/routes/user_routes.dart';
|
||||
import 'package:chat/services/auth_service.dart';
|
||||
import 'package:chat/services/tim/apply_service.dart';
|
||||
import 'package:chat/services/tim/friend_service.dart';
|
||||
import 'package:chat/utils/convert.dart';
|
||||
import 'package:chat/widgets/custom_avatar.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -34,7 +37,7 @@ class _ImFriendRequestState extends State<ContactFriendRequestPage> {
|
||||
title: const Text('新的朋友'),
|
||||
bottom: _Search(
|
||||
onChanged: (String e) async {
|
||||
if (e.length < 3) {
|
||||
if (e.isEmpty) {
|
||||
setState(() {
|
||||
searchList = null;
|
||||
});
|
||||
@@ -232,7 +235,7 @@ class _Search extends StatelessWidget implements PreferredSizeWidget {
|
||||
child: TextField(
|
||||
keyboardType: TextInputType.phone,
|
||||
decoration: InputDecoration(
|
||||
hintText: '请输入对方手机号',
|
||||
hintText: '请输入对方的区块链地址',
|
||||
hintStyle: const TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColors.unactive,
|
||||
@@ -266,19 +269,24 @@ class _Search extends StatelessWidget implements PreferredSizeWidget {
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(ContactRoutes.friendProfile);
|
||||
Get.toNamed(UserRoutes.qrCode);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: const [
|
||||
children: [
|
||||
Text(
|
||||
'我的二维码: ',
|
||||
style: TextStyle(
|
||||
'我的地址: ' +
|
||||
Convert.hideCenterStr(
|
||||
AuthService.to.userInfo.value.address!,
|
||||
start: 4,
|
||||
end: 4,
|
||||
),
|
||||
style: const TextStyle(
|
||||
color: AppColors.unactive,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
Icon(
|
||||
const SizedBox(width: 8),
|
||||
const Icon(
|
||||
Icons.qr_code,
|
||||
size: 18,
|
||||
color: AppColors.unactive,
|
||||
|
||||
@@ -27,7 +27,10 @@ class HomePage extends StatelessWidget {
|
||||
child: GetX<TimConversationService>(
|
||||
builder: (_) {
|
||||
return _.conversationList.isEmpty
|
||||
? CustomEasyRefresh.empty(text: '')
|
||||
? ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: Get.height / 2),
|
||||
child: CustomEasyRefresh.empty(text: '暂无消息'),
|
||||
)
|
||||
: ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const ClampingScrollPhysics(),
|
||||
@@ -68,7 +71,7 @@ class HomePage extends StatelessWidget {
|
||||
Get.toNamed(ContactRoutes.groupCreate);
|
||||
break;
|
||||
case 'C':
|
||||
Get.toNamed(ContactRoutes.friendSearch);
|
||||
Get.toNamed(ContactRoutes.friendRequest);
|
||||
break;
|
||||
case 'D':
|
||||
Permission.camera.request().isGranted.then((value) {
|
||||
|
||||
@@ -35,7 +35,6 @@ class CustomEasyRefresh {
|
||||
double size = 156.0,
|
||||
}) {
|
||||
return Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@@ -43,6 +42,9 @@ class CustomEasyRefresh {
|
||||
'assets/images/empty/im_emptyIcon_2.png',
|
||||
width: size,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 16,
|
||||
),
|
||||
Text(
|
||||
text,
|
||||
style: const TextStyle(
|
||||
|
||||
Reference in New Issue
Block a user