优化和改了几个提示内容

This commit is contained in:
yangyuhao 2023-08-30 15:07:37 +08:00
parent cd07949a64
commit bd949a21df
7 changed files with 88 additions and 84 deletions

View File

@ -65,8 +65,8 @@ android {
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode 2
versionName "1.0.1"
versionCode 6
versionName "1.0.5"
manifestPlaceholders = [
vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

@ -79,6 +79,13 @@
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
@ -89,12 +96,6 @@
<meta-data
android:name="com.vivo.push.app_id"
android:value="105669716" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data

View File

@ -1,4 +1,5 @@
import 'package:circle_app/app/circle/widgets/info_list_view.dart';
import 'package:circle_app/app/msg/view.dart';
import 'package:circle_app/common/Widgets/open_vip_tip/view.dart';
import 'package:circle_app/router/app_routers.dart';
import 'package:circle_app/util/util.dart';
@ -44,11 +45,9 @@ class _CirclePageState extends State<CirclePage>
return Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
decoration: const BoxDecoration(
color: const Color(0xFF423055),
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
image: bgWidget),
child: Scaffold(
backgroundColor: Colors.transparent,
body: SafeArea(
@ -123,8 +122,12 @@ class _CirclePageState extends State<CirclePage>
infoList = statistics.lastVisitUsers;
if (infoList.isNotEmpty) {
for (var element in infoList) {
if(element["avatar"]!=null&&element["avatar"].contains("http")){
urlList.add(element["avatar"]);
}
// urlList.add(element["avatar"]);
}
}
}

View File

@ -1,4 +1,3 @@
import 'package:circle_app/util/util.dart';
import 'package:circle_app/view/ExitAppConfirmation.dart';
import 'package:flutter/material.dart';
@ -14,25 +13,28 @@ class HomePage extends StatefulWidget {
State<HomePage> createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
class _HomePageState extends State<HomePage>
with AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
final logic = Get.lazyPut(() => HomeLogic());
final state = Get.find<HomeLogic>().state;
@override
@override
Widget build(BuildContext context) {
super.build(context);
return GetBuilder(builder: (HomeLogic controller) {
return GestureDetector(
onTap: () {
controller.onReady();
// Get.toNamed(AppRoutes.Complete_materialPage);
},
child: ExitAppConfirmation(child: Stack(children: [
Scaffold(
return ExitAppConfirmation(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
),
child: Scaffold(
resizeToAvoidBottomInset: false,
// backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
bottomNavigationBar: Container(
@ -51,9 +53,12 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
funcItem(0, 'msg', 0 == controller.currentIndex, controller),
funcItem(1, 'circle', 1 == controller.currentIndex, controller),
funcItem(2, 'mine', 2 == controller.currentIndex, controller),
funcItem(
0, 'msg', 0 == controller.currentIndex, controller),
funcItem(1, 'circle', 1 == controller.currentIndex,
controller),
funcItem(2, 'mine', 2 == controller.currentIndex,
controller),
],
),
),
@ -66,8 +71,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
children: controller.tabs,
),
),
],),)
),
);
});
}
@ -84,11 +88,8 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
controller.updateIndex(index);
}
},
child: Stack(
alignment: Alignment.center,
children:[
child: Stack(alignment: Alignment.center, children: [
Container(
margin: EdgeInsets.only(top: 8.sp),
child: Center(
child: Image.asset(
@ -102,33 +103,34 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
),
// Obx(() => null)
Obx(() => Visibility(
visible: index == 0 &&controller.unreadSIze!="0",
visible: index == 0 && controller.unreadSIze != "0",
child: Positioned(
// right: 4.sp,
top: 4.sp,
child:
Container(
margin: EdgeInsets.only(left: int.parse(controller.unreadSIze.value) > 99 ? 30.sp : 20.sp),
child: Container(
margin: EdgeInsets.only(
left: int.parse(controller.unreadSIze.value) > 99
? 30.sp
: 20.sp),
height: 18.sp,
padding: EdgeInsets.only(left: 5.sp,right: 5.sp),
padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(11.sp)
),
borderRadius: BorderRadius.circular(11.sp)),
child: Text(
int.parse(controller.unreadSIze.value) > 99 ? '99+' : controller.unreadSIze.value, // The number in the red dot
int.parse(controller.unreadSIze.value) > 99
? '99+'
: controller.unreadSIze.value,
// The number in the red dot
style: TextStyle(
color: Colors.white,
fontSize: 12.0.sp, // Font size of the text
),
),
),
)))
]
),
]),
),
);
}

View File

@ -2,6 +2,7 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:circle_app/app/msg/view.dart';
import 'package:circle_app/router/app_routers.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -34,11 +35,8 @@ class MinefragmentPage extends StatelessWidget {
body: Container(
width: Get.width,
height: Get.height,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
decoration: const BoxDecoration(
image: bgWidget,
),
child: Padding(
padding: EdgeInsets.only(

View File

@ -17,7 +17,9 @@ import 'package:tencent_cloud_chat_uikit/ui/controller/tim_uikit_conversation_co
import '../../util/eventBus.dart';
import 'TIMUIKitConversation/tim_uikit_conversation.dart';
import 'logic.dart';
const bgWidget = DecorationImage(
fit: BoxFit.fill,
image: AssetImage('assets/images/base/home_back.png'));
class MsgPage extends StatelessWidget {
MsgPage({Key? key}) : super(key: key);
@ -63,10 +65,8 @@ class MsgPage extends StatelessWidget {
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
decoration: const BoxDecoration(
image: bgWidget),
),
SafeArea(
child: GetBuilder(builder: (MsgLogic controller) {

View File

@ -255,10 +255,10 @@ class DioManager {
// String? errorMsg = isNetworkConnected
// ? e.requestOptions.extra["errorMsg"]
// : "网络连接断开,请检查网络设置";
return {'code': 500, 'msg': '请求失败'};
return {'code': 500, 'msg': '加载中'};
} catch (e) {
//
return {'code': 500, 'msg': '请求异常'};
return {'code': 500, 'msg': '加载中...'};
}
}
//