安卓1.2.1代码修改,iOS1.2.2代码提交
This commit is contained in:
parent
2a84997430
commit
b31a658a1b
@ -72,7 +72,7 @@ android {
|
|||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 14
|
versionCode 14
|
||||||
versionName "1.2.0"
|
versionName "1.2.2"
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
vivo_APPID: "105669716",
|
vivo_APPID: "105669716",
|
||||||
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
vivo_APPKEY:"84f750207787376b310ca5b0d5969122",
|
||||||
|
|||||||
@ -381,7 +381,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.2.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -530,7 +530,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.2.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@ -573,7 +573,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.2.2;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.exampe.circleApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@ -32,7 +32,9 @@ class AboutappLogic extends GetxController {
|
|||||||
_updateInfo = bean.data;
|
_updateInfo = bean.data;
|
||||||
version = bean.data.version;
|
version = bean.data.version;
|
||||||
update();
|
update();
|
||||||
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
if (isUpdate) {
|
||||||
|
showReportDialog(Get.context!, bean.data.constraint == 0, bean.data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//getVersion();
|
//getVersion();
|
||||||
@ -51,7 +53,7 @@ class AboutappLogic extends GetxController {
|
|||||||
if(isUpdate){
|
if(isUpdate){
|
||||||
showReportDialog(Get.context!, _updateInfo!.constraint == 0, _updateInfo!);
|
showReportDialog(Get.context!, _updateInfo!.constraint == 0, _updateInfo!);
|
||||||
}else {
|
}else {
|
||||||
showOKToast("暂无新版本");
|
showOKToast("当前已经是最新版本!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -454,6 +454,8 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
_buildRepliedMessage(widget.repliedMessage),
|
_buildRepliedMessage(widget.repliedMessage),
|
||||||
Stack(
|
Stack(
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
|
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@ -468,26 +470,26 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding:
|
padding:
|
||||||
EdgeInsets.symmetric(vertical: 8, horizontal: 12.sp),
|
EdgeInsets.symmetric(vertical: 8, horizontal: 12.sp),
|
||||||
constraints: const BoxConstraints(minHeight: 30),
|
constraints: const BoxConstraints(minHeight: 30),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
if (widget.forbiddenText != null)
|
if (widget.forbiddenText != null)
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 35,
|
height: 35,
|
||||||
color: theme.weakBackgroundColor,
|
color: theme.weakBackgroundColor,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Text(
|
child: Text(
|
||||||
TIM_t(widget.forbiddenText!),
|
TIM_t(widget.forbiddenText!),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: theme.weakTextColor,
|
color: theme.weakTextColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
if (PlatformUtils().isMobile &&
|
if (PlatformUtils().isMobile &&
|
||||||
widget.showSendAudio &&
|
widget.showSendAudio &&
|
||||||
widget.forbiddenText == null)
|
widget.forbiddenText == null)
|
||||||
@ -531,7 +533,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 8, horizontal: 12.sp),
|
vertical: 8, horizontal: 12.sp),
|
||||||
constraints:
|
constraints:
|
||||||
const BoxConstraints(minHeight: 30),
|
const BoxConstraints(minHeight: 30),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0x1AFFFFFF),
|
color: Color(0x1AFFFFFF),
|
||||||
borderRadius: BorderRadius.circular(26.sp),
|
borderRadius: BorderRadius.circular(26.sp),
|
||||||
@ -542,91 +544,91 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: showSendSoundText
|
child: showSendSoundText
|
||||||
? TIMSendSoundMessage(
|
? TIMSendSoundMessage(
|
||||||
onDownBottom:
|
onDownBottom:
|
||||||
widget.goDownBottom,
|
widget.goDownBottom,
|
||||||
conversationID:
|
conversationID:
|
||||||
widget.conversationID,
|
widget.conversationID,
|
||||||
conversationType:
|
conversationType:
|
||||||
widget.conversationType)
|
widget.conversationType)
|
||||||
: KeyboardVisibility(
|
: KeyboardVisibility(
|
||||||
child: ExtendedTextField(
|
child: ExtendedTextField(
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
fontSize: 14.sp),
|
fontSize: 14.sp),
|
||||||
maxLines: 4,
|
maxLines: 4,
|
||||||
minLines: 1,
|
minLines: 1,
|
||||||
focusNode: widget.focusNode,
|
focusNode: widget.focusNode,
|
||||||
onChanged: debounceFunc,
|
onChanged: debounceFunc,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showKeyboard = true;
|
showKeyboard = true;
|
||||||
widget.goDownBottom();
|
widget.goDownBottom();
|
||||||
setState(() {
|
setState(() {
|
||||||
showEmojiPanel = false;
|
showEmojiPanel = false;
|
||||||
showMore = false;
|
showMore = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
keyboardType:
|
keyboardType:
|
||||||
TextInputType.multiline,
|
TextInputType.multiline,
|
||||||
textInputAction:
|
textInputAction:
|
||||||
PlatformUtils()
|
PlatformUtils()
|
||||||
.isAndroid
|
.isAndroid
|
||||||
? TextInputAction
|
? TextInputAction
|
||||||
.newline
|
.newline
|
||||||
: TextInputAction
|
: TextInputAction
|
||||||
.send,
|
.send,
|
||||||
onEditingComplete: () {
|
onEditingComplete: () {
|
||||||
widget.onSubmitted();
|
widget.onSubmitted();
|
||||||
if (showKeyboard) {
|
if (showKeyboard) {
|
||||||
widget.focusNode
|
widget.focusNode
|
||||||
.requestFocus();
|
.requestFocus();
|
||||||
}
|
|
||||||
setState(() {
|
|
||||||
if (widget
|
|
||||||
.textEditingController
|
|
||||||
.text
|
|
||||||
.isEmpty) {
|
|
||||||
showMoreButton = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
textAlignVertical:
|
|
||||||
TextAlignVertical.top,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
border: InputBorder.none,
|
|
||||||
hintStyle: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color:
|
|
||||||
Color(0xB3FFFFFF),
|
|
||||||
),
|
|
||||||
hintText: widget.hintText,
|
|
||||||
fillColor:
|
|
||||||
Colors.transparent,
|
|
||||||
filled: true,
|
|
||||||
isDense: true,
|
|
||||||
),
|
|
||||||
controller: widget
|
|
||||||
.textEditingController,
|
|
||||||
specialTextSpanBuilder:
|
|
||||||
PlatformUtils().isWeb
|
|
||||||
? null
|
|
||||||
: DefaultSpecialTextSpanBuilder(
|
|
||||||
isUseDefaultEmoji:
|
|
||||||
widget
|
|
||||||
.isUseDefaultEmoji,
|
|
||||||
customEmojiStickerList:
|
|
||||||
widget
|
|
||||||
.customEmojiStickerList,
|
|
||||||
showAtBackground:
|
|
||||||
true,
|
|
||||||
)),
|
|
||||||
onChanged: (bool visibility) {
|
|
||||||
if (showKeyboard !=
|
|
||||||
visibility) {
|
|
||||||
setState(() {
|
|
||||||
showKeyboard = visibility;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}),
|
setState(() {
|
||||||
|
if (widget
|
||||||
|
.textEditingController
|
||||||
|
.text
|
||||||
|
.isEmpty) {
|
||||||
|
showMoreButton = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
textAlignVertical:
|
||||||
|
TextAlignVertical.top,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: InputBorder.none,
|
||||||
|
hintStyle: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
color:
|
||||||
|
Color(0xB3FFFFFF),
|
||||||
|
),
|
||||||
|
hintText: widget.hintText,
|
||||||
|
fillColor:
|
||||||
|
Colors.transparent,
|
||||||
|
filled: true,
|
||||||
|
isDense: true,
|
||||||
|
),
|
||||||
|
controller: widget
|
||||||
|
.textEditingController,
|
||||||
|
specialTextSpanBuilder:
|
||||||
|
PlatformUtils().isWeb
|
||||||
|
? null
|
||||||
|
: DefaultSpecialTextSpanBuilder(
|
||||||
|
isUseDefaultEmoji:
|
||||||
|
widget
|
||||||
|
.isUseDefaultEmoji,
|
||||||
|
customEmojiStickerList:
|
||||||
|
widget
|
||||||
|
.customEmojiStickerList,
|
||||||
|
showAtBackground:
|
||||||
|
true,
|
||||||
|
)),
|
||||||
|
onChanged: (bool visibility) {
|
||||||
|
if (showKeyboard !=
|
||||||
|
visibility) {
|
||||||
|
setState(() {
|
||||||
|
showKeyboard = visibility;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}),
|
||||||
),
|
),
|
||||||
if (widget.forbiddenText == null)
|
if (widget.forbiddenText == null)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
@ -677,7 +679,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
Container(
|
Container(
|
||||||
height: 40.sp,
|
height: 40.sp,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
margin: EdgeInsets.only(bottom: showEmojiPanel ? Platform.isIOS ? 40.sp : 10.sp : 0),
|
margin: EdgeInsets.only(bottom: showEmojiPanel ? Platform.isIOS ? 0.sp : 10.sp : 0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
@ -701,7 +703,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
var data =
|
var data =
|
||||||
await Permission.microphone.request();
|
await Permission.microphone.request();
|
||||||
if (data.isGranted) {
|
if (data.isGranted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
showEmojiPanel = false;
|
showEmojiPanel = false;
|
||||||
@ -731,7 +733,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
getImageFile();
|
getImageFile();
|
||||||
},
|
},
|
||||||
child:
|
child:
|
||||||
Image.asset(getMsgImage('photo'), width: 40.sp),
|
Image.asset(getMsgImage('photo'), width: 40.sp),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@ -772,9 +774,9 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
AnimatedContainer(
|
AnimatedContainer(
|
||||||
duration: Duration(
|
duration: Duration(
|
||||||
milliseconds:
|
milliseconds:
|
||||||
(showKeyboard && PlatformUtils().isAndroid)
|
(showKeyboard && PlatformUtils().isAndroid)
|
||||||
? 200
|
? 200
|
||||||
: 340),
|
: 340),
|
||||||
curve: Curves.fastOutSlowIn,
|
curve: Curves.fastOutSlowIn,
|
||||||
height: max(_getBottomHeight(), 0.0),
|
height: max(_getBottomHeight(), 0.0),
|
||||||
// child: ListView(
|
// child: ListView(
|
||||||
@ -786,7 +788,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: MediaQuery.of(context).padding.bottom + 20,
|
bottom:0,
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: Duration(
|
duration: Duration(
|
||||||
milliseconds: (showKeyboard && PlatformUtils().isAndroid)
|
milliseconds: (showKeyboard && PlatformUtils().isAndroid)
|
||||||
@ -800,7 +802,7 @@ class _TIMTextFieldLayoutNarrowState
|
|||||||
children: [_getBottomContainer()],
|
children: [_getBottomContainer()],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|||||||
@ -114,12 +114,12 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
return TIMChat(
|
return TIMChat(
|
||||||
conversation: Get.arguments,
|
conversation: Get.arguments,
|
||||||
customStickerPanel: renderCustomStickerPanel,
|
customStickerPanel: renderCustomStickerPanel,
|
||||||
onTapAvatar :(String userId,TapDownDetails tapDownDetails)async{
|
// onTapAvatar :(String userId,TapDownDetails tapDownDetails)async{
|
||||||
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: userId.toString().split('_').last);
|
// var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: userId.toString().split('_').last,preventDuplicates: false);
|
||||||
// setState(() {
|
// // setState(() {
|
||||||
//
|
// //
|
||||||
// });
|
// // });
|
||||||
},
|
// },
|
||||||
controller : _timuiKitChatController,
|
controller : _timuiKitChatController,
|
||||||
config: TIMUIKitChatConfig(
|
config: TIMUIKitChatConfig(
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
centerTitle: con.showName! ?? '',
|
centerTitle: con.showName! ?? '',
|
||||||
actionWdiget: GestureDetector(
|
actionWdiget: GestureDetector(
|
||||||
onTap: () async{
|
onTap: () async{
|
||||||
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: con.userID.toString().split('_').last);
|
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: con.userID.toString().split('_').last,preventDuplicates: false);
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Text('TA的主页',style: TextStyle(color: const Color(0xFF00FFF4),fontSize:12.sp,fontWeight: FontWeight.w500),),
|
child: Text('TA的主页',style: TextStyle(color: const Color(0xFF00FFF4),fontSize:12.sp,fontWeight: FontWeight.w500),),
|
||||||
@ -190,7 +190,9 @@ class _ChatPageState extends State<ChatPage> {
|
|||||||
print(url);
|
print(url);
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: message.sender!.toString().split('_').last);
|
// V2TimConversation con = Get.arguments;
|
||||||
|
// if (message.sender == con.userID.toString()) return;
|
||||||
|
var data = await Get.toNamed(AppRoutes.UserInfoActivity,arguments: message.sender!.toString().split('_').last,preventDuplicates: false);
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_install_app/flutter_install_app.dart';
|
// import 'package:flutter_install_app/flutter_install_app.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
@ -260,7 +260,7 @@ class _CustomDialogState extends State<UpdateDialog> {
|
|||||||
// SmartDialog.dismiss();
|
// SmartDialog.dismiss();
|
||||||
print(error);
|
print(error);
|
||||||
});
|
});
|
||||||
await AppInstaller.installApk(filePath, actionRequired: false);
|
// await AppInstaller.installApk(filePath, actionRequired: false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,31 +25,29 @@ class SplashLogic extends GetxController {
|
|||||||
void onReady() async {
|
void onReady() async {
|
||||||
// TODO: implement onReady
|
// TODO: implement onReady
|
||||||
super.onReady();
|
super.onReady();
|
||||||
|
loadConfig();
|
||||||
|
checkStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
loadConfig() async {
|
||||||
void onInit() {
|
var data1 =
|
||||||
super.onInit();
|
await DioManager.instance.get(url: Api.getCircleList, params: {});
|
||||||
// await Future.delayed(Duration(seconds: 30));
|
var bean1 = BaseResponse<ConfigBean>.fromJson(
|
||||||
|
data1, (data1) => ConfigBean.fromJson(data1));
|
||||||
|
if (bean1.code == 200) {
|
||||||
|
configBean = bean1.data!;
|
||||||
|
|
||||||
// var data1 =
|
configBean.genderMap.forEach((key, value) {
|
||||||
// await DioManager.instance.get(url: Api.getCircleList, params: {});
|
genderList.add(value);
|
||||||
// var bean1 = BaseResponse<ConfigBean>.fromJson(
|
});
|
||||||
// data1, (data1) => ConfigBean.fromJson(data1));
|
|
||||||
// if (bean1.code == 200) {
|
configBean.orientationMap.forEach((key, value) {
|
||||||
// configBean = bean1.data!;
|
orientationList.add(value);
|
||||||
//
|
});
|
||||||
// configBean.genderMap.forEach((key, value) {
|
configBean.roleMap.forEach((key, value) {
|
||||||
// genderList.add(value);
|
roleList.add(value);
|
||||||
// });
|
});
|
||||||
//
|
}
|
||||||
// configBean.orientationMap.forEach((key, value) {
|
|
||||||
// orientationList.add(value);
|
|
||||||
// });
|
|
||||||
// configBean.roleMap.forEach((key, value) {
|
|
||||||
// roleList.add(value);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
checkStatus() async {
|
checkStatus() async {
|
||||||
|
|||||||
@ -51,9 +51,6 @@ class MyTabbedScreenState extends State<UserinfoPage>
|
|||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
if (OverlayClass.overlayEntry != null) {
|
|
||||||
OverlayClass.overlayEntry!.remove();
|
|
||||||
}
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,7 @@ import 'package:circle_app/util/util.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_bugly/flutter_bugly.dart';
|
import 'package:flutter_bugly/flutter_bugly.dart';
|
||||||
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||||
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
import 'package:flutter_native_splash/flutter_native_splash.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
@ -503,6 +504,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
const TextStyle(fontSize: 19.0, color: Colors.white),
|
const TextStyle(fontSize: 19.0, color: Colors.white),
|
||||||
backgroundColor: Colors.grey,
|
backgroundColor: Colors.grey,
|
||||||
animationCurve: Curves.easeIn,
|
animationCurve: Curves.easeIn,
|
||||||
|
|
||||||
// animationBuilder: const Miui10AnimBuilder(),
|
// animationBuilder: const Miui10AnimBuilder(),
|
||||||
animationDuration: const Duration(milliseconds: 200),
|
animationDuration: const Duration(milliseconds: 200),
|
||||||
duration: const Duration(seconds: 2),
|
duration: const Duration(seconds: 2),
|
||||||
@ -510,6 +512,17 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
|
|||||||
title: '微乐园',
|
title: '微乐园',
|
||||||
initialBinding: SplashBinding(),
|
initialBinding: SplashBinding(),
|
||||||
getPages: AppPages.routes,
|
getPages: AppPages.routes,
|
||||||
|
/// 国际化处理
|
||||||
|
localizationsDelegates: const [
|
||||||
|
GlobalMaterialLocalizations.delegate,
|
||||||
|
GlobalWidgetsLocalizations.delegate,
|
||||||
|
GlobalCupertinoLocalizations.delegate, /// iOS一定要设置,不然报错
|
||||||
|
],
|
||||||
|
locale: const Locale('zh', 'CN'),
|
||||||
|
supportedLocales : const [
|
||||||
|
Locale('zh', 'CN'),
|
||||||
|
Locale('en', 'US'),
|
||||||
|
],
|
||||||
home: SplashPage(),
|
home: SplashPage(),
|
||||||
builder: FlutterSmartDialog.init(),
|
builder: FlutterSmartDialog.init(),
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
|
|||||||
@ -6,9 +6,7 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
typedef void NoticeCallback();
|
typedef void NoticeCallback();
|
||||||
class OverlayClass {
|
|
||||||
static OverlayEntry? overlayEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
void showFloatingButtonOverlay(
|
void showFloatingButtonOverlay(
|
||||||
BuildContext context, String nickname, String ageMsg, String avatar,int event,NoticeCallback noticeCallback) {
|
BuildContext context, String nickname, String ageMsg, String avatar,int event,NoticeCallback noticeCallback) {
|
||||||
@ -22,7 +20,7 @@ void showFloatingButtonOverlay(
|
|||||||
late Timer countdownTimer;
|
late Timer countdownTimer;
|
||||||
|
|
||||||
// 创建 OverlayEntry
|
// 创建 OverlayEntry
|
||||||
OverlayClass.overlayEntry = OverlayEntry(
|
overlayEntry = OverlayEntry(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
top: 30,
|
top: 30,
|
||||||
@ -119,11 +117,7 @@ void showFloatingButtonOverlay(
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
countdownTimer.cancel(); // 取消计时器
|
countdownTimer.cancel(); // 取消计时器
|
||||||
try {
|
overlayEntry!.remove();
|
||||||
OverlayClass.overlayEntry!.remove();
|
|
||||||
} catch (e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
noticeCallback();
|
noticeCallback();
|
||||||
|
|
||||||
// logic.setLike();
|
// logic.setLike();
|
||||||
@ -180,14 +174,9 @@ void showFloatingButtonOverlay(
|
|||||||
} else {
|
} else {
|
||||||
timer.cancel();
|
timer.cancel();
|
||||||
// 取消计时器
|
// 取消计时器
|
||||||
|
overlayEntry!.remove();
|
||||||
try {
|
|
||||||
OverlayClass.overlayEntry!.remove();
|
|
||||||
} catch (e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 将 OverlayEntry 添加到 Overlay 中
|
// 将 OverlayEntry 添加到 Overlay 中
|
||||||
overlayState?.insert(OverlayClass.overlayEntry!);
|
overlayState?.insert(overlayEntry!);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -606,14 +606,6 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.3"
|
version: "1.1.3"
|
||||||
flutter_install_app:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_install_app
|
|
||||||
sha256: "9b117006d17c900e671c26bcbc9b15c7b8efd15d6f9b4442ad5d576de20fab53"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
flutter_intl:
|
flutter_intl:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -646,6 +638,11 @@ packages:
|
|||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.0.0"
|
version: "5.0.0"
|
||||||
|
flutter_localizations:
|
||||||
|
dependency: "direct main"
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
flutter_luban:
|
flutter_luban:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|||||||
@ -31,6 +31,8 @@ dependencies:
|
|||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
|
flutter_localizations: # 国际化处理
|
||||||
|
sdk: flutter
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
@ -93,7 +95,7 @@ dependencies:
|
|||||||
#event_bus:
|
#event_bus:
|
||||||
event_bus: ^2.0.0
|
event_bus: ^2.0.0
|
||||||
#安装apk
|
#安装apk
|
||||||
flutter_install_app: 1.3.0
|
# flutter_install_app: 1.3.0
|
||||||
#闪屏页
|
#闪屏页
|
||||||
flutter_native_splash: 2.2.16
|
flutter_native_splash: 2.2.16
|
||||||
#腾讯离线推送
|
#腾讯离线推送
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user