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