优化和改了几个提示内容

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. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21 minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 2 versionCode 6
versionName "1.0.1" versionName "1.0.5"
manifestPlaceholders = [ manifestPlaceholders = [
vivo_APPID: "105669716", vivo_APPID: "105669716",
vivo_APPKEY:"84f750207787376b310ca5b0d5969122", vivo_APPKEY:"84f750207787376b310ca5b0d5969122",

View File

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

View File

@ -1,4 +1,5 @@
import 'package:circle_app/app/circle/widgets/info_list_view.dart'; 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/common/Widgets/open_vip_tip/view.dart';
import 'package:circle_app/router/app_routers.dart'; import 'package:circle_app/router/app_routers.dart';
import 'package:circle_app/util/util.dart'; import 'package:circle_app/util/util.dart';
@ -44,11 +45,9 @@ class _CirclePageState extends State<CirclePage>
return Container( return Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
decoration: BoxDecoration( decoration: const BoxDecoration(
color: const Color(0xFF423055), color: const Color(0xFF423055),
image: DecorationImage( image: bgWidget),
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
body: SafeArea( body: SafeArea(
@ -123,7 +122,11 @@ class _CirclePageState extends State<CirclePage>
infoList = statistics.lastVisitUsers; infoList = statistics.lastVisitUsers;
if (infoList.isNotEmpty) { if (infoList.isNotEmpty) {
for (var element in infoList) { for (var element in infoList) {
urlList.add(element["avatar"]); 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/util/util.dart';
import 'package:circle_app/view/ExitAppConfirmation.dart'; import 'package:circle_app/view/ExitAppConfirmation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -14,25 +13,28 @@ class HomePage extends StatefulWidget {
State<HomePage> createState() => _HomePageState(); State<HomePage> createState() => _HomePageState();
} }
class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin { class _HomePageState extends State<HomePage>
with AutomaticKeepAliveClientMixin {
@override @override
bool get wantKeepAlive => true; bool get wantKeepAlive => true;
final logic = Get.lazyPut(() => HomeLogic()); final logic = Get.lazyPut(() => HomeLogic());
final state = Get.find<HomeLogic>().state; final state = Get.find<HomeLogic>().state;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); super.build(context);
return GetBuilder(builder: (HomeLogic controller) { return GetBuilder(builder: (HomeLogic controller) {
return GestureDetector( return ExitAppConfirmation(
onTap: () { child: Container(
controller.onReady(); decoration: BoxDecoration(
// Get.toNamed(AppRoutes.Complete_materialPage); image: DecorationImage(
}, image: AssetImage(getBaseImage("home_back")),
child: ExitAppConfirmation(child: Stack(children: [ fit: BoxFit.cover,
Scaffold( ),
),
child: Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
// backgroundColor: Color.fromRGBO(244, 245, 245, 1.0), // backgroundColor: Color.fromRGBO(244, 245, 245, 1.0),
bottomNavigationBar: Container( bottomNavigationBar: Container(
@ -51,9 +53,12 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
funcItem(0, 'msg', 0 == controller.currentIndex, controller), funcItem(
funcItem(1, 'circle', 1 == controller.currentIndex, controller), 0, 'msg', 0 == controller.currentIndex, controller),
funcItem(2, 'mine', 2 == controller.currentIndex, controller), funcItem(1, 'circle', 1 == controller.currentIndex,
controller),
funcItem(2, 'mine', 2 == controller.currentIndex,
controller),
], ],
), ),
), ),
@ -61,13 +66,12 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
controller: controller.pageController, controller: controller.pageController,
onPageChanged: (int index) { onPageChanged: (int index) {
// controller.updateIndex(index); // controller.updateIndex(index);
}, },
children: controller.tabs, children: controller.tabs,
), ),
), ),
),
],),)
); );
}); });
} }
@ -84,51 +88,49 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
controller.updateIndex(index); controller.updateIndex(index);
} }
}, },
child: Stack( child: Stack(alignment: Alignment.center, children: [
alignment: Alignment.center, Container(
children:[ margin: EdgeInsets.only(top: 8.sp),
Container( child: Center(
child: Image.asset(
margin: EdgeInsets.only(top: 8.sp), isSelected
child: Center( ? getTabbarImage('${image}_selected')
child: Image.asset( : getTabbarImage('${image}_normal'),
isSelected width: 34.sp,
? getTabbarImage('${image}_selected') height: 34.sp,
: getTabbarImage('${image}_normal'),
width: 34.sp,
height: 34.sp,
),
), ),
), ),
),
// Obx(() => null) // Obx(() => null)
Obx(() => Visibility( Obx(() => Visibility(
visible: index == 0 &&controller.unreadSIze!="0", visible: index == 0 && controller.unreadSIze != "0",
child: Positioned( child: Positioned(
// right: 4.sp, // right: 4.sp,
top: 4.sp, top: 4.sp,
child: child: Container(
Container( margin: EdgeInsets.only(
margin: EdgeInsets.only(left: int.parse(controller.unreadSIze.value) > 99 ? 30.sp : 20.sp), left: int.parse(controller.unreadSIze.value) > 99
height: 18.sp, ? 30.sp
padding: EdgeInsets.only(left: 5.sp,right: 5.sp), : 20.sp),
alignment: Alignment.center, height: 18.sp,
decoration: BoxDecoration( padding: EdgeInsets.only(left: 5.sp, right: 5.sp),
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.red, color: Colors.red,
borderRadius: BorderRadius.circular(11.sp) borderRadius: BorderRadius.circular(11.sp)),
), child: Text(
child: Text( int.parse(controller.unreadSIze.value) > 99
int.parse(controller.unreadSIze.value) > 99 ? '99+' : controller.unreadSIze.value, // The number in the red dot ? '99+'
style: TextStyle( : controller.unreadSIze.value,
color: Colors.white, // The number in the red dot
fontSize: 12.0.sp, // Font size of the text style: TextStyle(
), color: Colors.white,
fontSize: 12.0.sp, // Font size of the text
), ),
), ),
),
))) )))
]),
]
),
), ),
); );
} }

View File

@ -2,6 +2,7 @@
import 'dart:io'; import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart'; 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:circle_app/router/app_routers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@ -34,11 +35,8 @@ class MinefragmentPage extends StatelessWidget {
body: Container( body: Container(
width: Get.width, width: Get.width,
height: Get.height, height: Get.height,
decoration: BoxDecoration( decoration: const BoxDecoration(
image: DecorationImage( image: bgWidget,
image: AssetImage(getBaseImage("home_back")),
fit: BoxFit.cover,
),
), ),
child: Padding( child: Padding(
padding: EdgeInsets.only( 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 '../../util/eventBus.dart';
import 'TIMUIKitConversation/tim_uikit_conversation.dart'; import 'TIMUIKitConversation/tim_uikit_conversation.dart';
import 'logic.dart'; import 'logic.dart';
const bgWidget = DecorationImage(
fit: BoxFit.fill,
image: AssetImage('assets/images/base/home_back.png'));
class MsgPage extends StatelessWidget { class MsgPage extends StatelessWidget {
MsgPage({Key? key}) : super(key: key); MsgPage({Key? key}) : super(key: key);
@ -63,10 +65,8 @@ class MsgPage extends StatelessWidget {
Container( Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
decoration: BoxDecoration( decoration: const BoxDecoration(
image: DecorationImage( image: bgWidget),
fit: BoxFit.fill,
image: AssetImage(getBaseImage('home_back')))),
), ),
SafeArea( SafeArea(
child: GetBuilder(builder: (MsgLogic controller) { child: GetBuilder(builder: (MsgLogic controller) {

View File

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