Jolie 3 months ago
parent
commit
4061a74275
8 changed files with 197 additions and 190 deletions
  1. 28
      ios/Podfile
  2. 56
      ios/Runner.xcodeproj/project.pbxproj
  3. 40
      lib/controller/discover/visitor_controller.dart
  4. 167
      lib/pages/discover/visitor_list_page.dart
  5. 68
      location_plugin/example/pubspec.lock
  6. 2
      pubspec.yaml
  7. 6
      scripts/build_android.sh
  8. 20
      scripts/build_ios.sh

28
ios/Podfile

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '13.0'
platform :ios, '14.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'
@ -27,17 +27,10 @@ require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelpe
flutter_ios_podfile_setup flutter_ios_podfile_setup
platform :ios, '14.0'
# 在 target 'Runner' do 之前添加
install! 'cocoapods', :deterministic_uuids => false
target 'Runner' do target 'Runner' do
use_frameworks! use_frameworks!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do target 'RunnerTests' do
inherit! :search_paths inherit! :search_paths
end end
@ -46,9 +39,24 @@ end
post_install do |installer| post_install do |installer|
installer.pods_project.targets.each do |target| installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config| target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
end end
end end
end end
pre_install do |installer|
# 定义 AgoraRtm framework 的路径
rtm_pod_path = File.join(installer.sandbox.root, 'AgoraRtm')
# aosl.xcframework 的完整路径
aosl_xcframework_path = File.join(rtm_pod_path, 'aosl.xcframework')
# 检查文件是否存在,如果存在则删除
if File.exist?(aosl_xcframework_path)
puts "Deleting aosl.xcframework from #{aosl_xcframework_path}"
FileUtils.rm_rf(aosl_xcframework_path)
else
puts "aosl.xcframework not found, skipping deletion."
end
end

56
ios/Runner.xcodeproj/project.pbxproj

@ -199,8 +199,8 @@
97C146EC1CF9000F007C117D /* Resources */, 97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */, 9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
A36064B7643972D96D7D5F55 /* [CP] Embed Pods Frameworks */,
60F9142B6626BDFC64679D81 /* [CP] Copy Pods Resources */,
94D55AE63458DA24E5D71252 /* [CP] Embed Pods Frameworks */,
02B79A8133218288B832A3BC /* [CP] Copy Pods Resources */,
); );
buildRules = ( buildRules = (
); );
@ -272,6 +272,23 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
02B79A8133218288B832A3BC /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
0C02713F79384C47FC4BC013 /* [CP] Check Pods Manifest.lock */ = { 0C02713F79384C47FC4BC013 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
@ -332,25 +349,21 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
}; };
60F9142B6626BDFC64679D81 /* [CP] Copy Pods Resources */ = {
94D55AE63458DA24E5D71252 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
); );
inputFileListPaths = ( inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
); );
name = "[CP] Copy Pods Resources";
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = ( outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0; showEnvVarsInLog = 0;
}; };
9740EEB61CF901F6004384FC /* Run Script */ = { 9740EEB61CF901F6004384FC /* Run Script */ = {
@ -368,27 +381,6 @@
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
}; };
A36064B7643972D96D7D5F55 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */

40
lib/controller/discover/visitor_controller.dart

@ -16,8 +16,9 @@ class VisitorController extends GetxController {
// //
var currentPage = 1.obs; var currentPage = 1.obs;
final int pageSize = 15;
final int pageSize = 10;
var hasMore = true.obs; var hasMore = true.obs;
var total = 0.obs;
var isLoading = false.obs; var isLoading = false.obs;
late final UserApi _userApi; late final UserApi _userApi;
@ -81,30 +82,16 @@ class VisitorController extends GetxController {
Get.snackbar('成功', '已删除访客记录'); Get.snackbar('成功', '已删除访客记录');
} }
// 访
int get todayVisitorsCount {
return visitors.length;
}
// 线访
int get onlineVisitorsCount {
return visitors.length;
}
Future<Map<String, dynamic>> _fetchVisitorData({required int pageNum}) async { Future<Map<String, dynamic>> _fetchVisitorData({required int pageNum}) async {
try { try {
print('_fetchVisitorData - pageNum: $pageNum, pageSize: $pageSize');
// API获取数据 // API获取数据
var response = await _userApi.getVisitorList(
pageNum: pageNum,
pageSize: pageSize,
);
var response = await _userApi.getVisitorList(pageNum: pageNum, pageSize: pageSize);
if (response.data.isSuccess) { if (response.data.isSuccess) {
final paginatedData = response.data.data;
final data = response.data.data;
// data是否为空 // data是否为空
if (paginatedData == null) {
if (data == null) {
return { return {
'records': <MarriageData>[], 'records': <MarriageData>[],
'current': pageNum, 'current': pageNum,
@ -113,18 +100,13 @@ class VisitorController extends GetxController {
'size': pageSize, 'size': pageSize,
}; };
} }
// data PaginatedResponse<dynamic>使
// records dynamic MarriageData
final records = paginatedData.records
.map((item) => MarriageData.fromJson(item as Map<String, dynamic>))
.toList();
total.value = data.total;
return { return {
'records': records,
'current': paginatedData.current,
'pages': paginatedData.pages,
'total': paginatedData.total,
'size': paginatedData.size,
'records': data.records,
'current': data.current,
'pages': data.pages,
'total': data.total,
'size': data.size,
}; };
} else { } else {
// //

167
lib/pages/discover/visitor_list_page.dart

@ -7,7 +7,10 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import '../../controller/discover/visitor_controller.dart'; import '../../controller/discover/visitor_controller.dart';
import '../../controller/global.dart';
import '../../generated/assets.dart';
import '../../model/home/marriage_data.dart'; import '../../model/home/marriage_data.dart';
import '../home/user_information_page.dart';
class VisitorListPage extends StatefulWidget { class VisitorListPage extends StatefulWidget {
const VisitorListPage({super.key}); const VisitorListPage({super.key});
@ -26,7 +29,7 @@ class _VisitorListPagePageState extends State<VisitorListPage> {
backgroundColor: Color(0xffF5F5F5), backgroundColor: Color(0xffF5F5F5),
appBar: AppBar( appBar: AppBar(
title: Obx(() => Text( title: Obx(() => Text(
'最近访客 (${visitorController.todayVisitorsCount})',
'最近访客 (${visitorController.total.value})',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold), style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
)), )),
centerTitle: true, centerTitle: true,
@ -90,19 +93,18 @@ class _VisitorListPagePageState extends State<VisitorListPage> {
noMoreText: '没有更多数据', noMoreText: '没有更多数据',
showMessage: false, showMessage: false,
), ),
child: ListView.separated(
padding: const EdgeInsets.only(top: 10, right: 10, left: 10),
child: GridView.builder(
padding: EdgeInsets.only(top: 8.w, left: 10.w, right: 8.w, bottom: 0.w),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, // 2
crossAxisSpacing: 4.w, //
mainAxisSpacing: 4.w, //
childAspectRatio: 1, //
),
itemCount: visitorController.visitors.length, itemCount: visitorController.visitors.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final visitor = visitorController.visitors[index]; final visitor = visitorController.visitors[index];
return VisitorListItem(visitor: visitor);
},
separatorBuilder: (context, index) {
//
if (visitorController.visitors.isEmpty) {
return const SizedBox.shrink();
}
return const SizedBox(height: 10);
return VisitorItem(visitor: visitor);
}, },
), ),
); );
@ -112,96 +114,101 @@ class _VisitorListPagePageState extends State<VisitorListPage> {
} }
class VisitorListItem extends StatelessWidget {
class VisitorItem extends StatelessWidget {
final MarriageData visitor; final MarriageData visitor;
const VisitorListItem({Key? key, required this.visitor}) : super(key: key);
const VisitorItem({Key? key, required this.visitor}) : super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(12),
),
padding: const EdgeInsets.all(12),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
return Stack(
children: [ children: [
//
Container(
width: 50,
height: 50,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.blue[100],
image: DecorationImage(
image: NetworkImage(visitor.profilePhoto),
fit: BoxFit.cover,
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(10.w)),
child: CachedNetworkImage(
imageUrl: "${visitor.profilePhoto}?x-oss-process=image/format,webp/resize,w_240",
width: 173.w,
height: 173.w,
fit: BoxFit.cover,
placeholder: (context, url) => Container(
color: Colors.white38,
child: Center(
child: CircularProgressIndicator(
strokeWidth: 1.w,
color: Colors.grey,
),
),
), ),
errorWidget: (context, url, error) =>
Image.asset(
Assets.imagesUserAvatar,
width: 173.w,
height: 173.w,
fit: BoxFit.cover,
),
), ),
), ),
SizedBox(width: 12),
Expanded(
Positioned(
left: 8.w,
bottom: 12.w,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row(
children: [
Text(
visitor.nickName,
style: TextStyle(
fontSize: 14,
),
),
Spacer(),
// Text(
// _formatTime(visitor.visitTime!),
// style: TextStyle(
// color: Colors.grey[500],
// fontSize: 13,
// ),
// ),
],
),
SizedBox(height: 4),
SizedBox(
// height: 20, // 20
child: Text(
visitor.describeInfo,
if(visitor.describeInfo.isNotEmpty)SizedBox(
width: 156.w,
child: Text(visitor.describeInfo,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 13,
color: Color.fromRGBO(51, 51, 51, 0.6),
fontSize: 12.w,
color: Colors.white,
fontWeight: FontWeight.w500,
), ),
overflow: TextOverflow.ellipsis, // ...
maxLines: 1, //
), ),
), ),
SizedBox(height: 2.w),
SizedBox(
width: 156.w,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"${visitor.cityName.isNotEmpty ? '${visitor.cityName} | ' : ''}${visitor.age}",
style: TextStyle(
fontSize: 14.w,
color: Colors.white,
fontWeight: FontWeight.w500,
),
),
Text('访问1次', style: TextStyle(color: Color(0xffA799FF), fontSize: 12.w))
],
),
)
], ],
)
),
) )
], ],
),
).onTap((){ ).onTap((){
// _showVisitorDetail(visitor);
Get.to(() => UserInformationPage(miId: visitor.miId, userId: GlobalData().userId!));
}); });
} }
String _formatTime(String timestamp) {
var time = DateTime.parse(timestamp);
final now = DateTime.now();
final difference = now.difference(time);
if (difference.inMinutes < 1) {
return '刚刚';
} else if (difference.inHours < 1) {
return '${difference.inMinutes}分钟前';
} else if (difference.inDays < 1) {
return '${difference.inHours}小时前';
} else if (difference.inDays < 7) {
return '${difference.inDays}天前';
} else {
return '${time.month}/${time.day}';
}
}
// String _formatTime(String timestamp) {
// var time = DateTime.parse(timestamp);
// final now = DateTime.now();
// final difference = now.difference(time);
//
// if (difference.inMinutes < 1) {
// return '刚刚';
// } else if (difference.inHours < 1) {
// return '${difference.inMinutes}分钟前';
// } else if (difference.inDays < 1) {
// return '${difference.inHours}小时前';
// } else if (difference.inDays < 7) {
// return '${difference.inDays}天前';
// } else {
// return '${time.month}/${time.day}';
// }
// }
} }

68
location_plugin/example/pubspec.lock

@ -6,7 +6,7 @@ packages:
description: description:
name: async name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.13.0" version: "2.13.0"
boolean_selector: boolean_selector:
@ -14,7 +14,7 @@ packages:
description: description:
name: boolean_selector name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
characters: characters:
@ -22,7 +22,7 @@ packages:
description: description:
name: characters name: characters
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.4.0" version: "1.4.0"
clock: clock:
@ -30,7 +30,7 @@ packages:
description: description:
name: clock name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.2" version: "1.1.2"
collection: collection:
@ -38,7 +38,7 @@ packages:
description: description:
name: collection name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.19.1" version: "1.19.1"
cupertino_icons: cupertino_icons:
@ -46,7 +46,7 @@ packages:
description: description:
name: cupertino_icons name: cupertino_icons
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.8" version: "1.0.8"
fake_async: fake_async:
@ -54,7 +54,7 @@ packages:
description: description:
name: fake_async name: fake_async
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.3.3" version: "1.3.3"
file: file:
@ -62,7 +62,7 @@ packages:
description: description:
name: file name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "7.0.1" version: "7.0.1"
flutter: flutter:
@ -80,7 +80,7 @@ packages:
description: description:
name: flutter_lints name: flutter_lints
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "5.0.0" version: "5.0.0"
flutter_test: flutter_test:
@ -98,7 +98,7 @@ packages:
description: description:
name: http name: http
sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.6.0" version: "1.6.0"
http_parser: http_parser:
@ -106,7 +106,7 @@ packages:
description: description:
name: http_parser name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.1.2" version: "4.1.2"
integration_test: integration_test:
@ -119,7 +119,7 @@ packages:
description: description:
name: leak_tracker name: leak_tracker
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "11.0.2" version: "11.0.2"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
@ -127,7 +127,7 @@ packages:
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.0.10" version: "3.0.10"
leak_tracker_testing: leak_tracker_testing:
@ -135,7 +135,7 @@ packages:
description: description:
name: leak_tracker_testing name: leak_tracker_testing
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.0.2" version: "3.0.2"
lints: lints:
@ -143,7 +143,7 @@ packages:
description: description:
name: lints name: lints
sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "5.1.1" version: "5.1.1"
location_plugin: location_plugin:
@ -158,7 +158,7 @@ packages:
description: description:
name: matcher name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.12.17" version: "0.12.17"
material_color_utilities: material_color_utilities:
@ -166,7 +166,7 @@ packages:
description: description:
name: material_color_utilities name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.11.1" version: "0.11.1"
meta: meta:
@ -174,7 +174,7 @@ packages:
description: description:
name: meta name: meta
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.16.0" version: "1.16.0"
path: path:
@ -182,7 +182,7 @@ packages:
description: description:
name: path name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.9.1" version: "1.9.1"
platform: platform:
@ -190,7 +190,7 @@ packages:
description: description:
name: platform name: platform
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.1.6" version: "3.1.6"
plugin_platform_interface: plugin_platform_interface:
@ -198,7 +198,7 @@ packages:
description: description:
name: plugin_platform_interface name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.8" version: "2.1.8"
process: process:
@ -206,7 +206,7 @@ packages:
description: description:
name: process name: process
sha256: c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744 sha256: c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "5.0.5" version: "5.0.5"
sky_engine: sky_engine:
@ -219,7 +219,7 @@ packages:
description: description:
name: source_span name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.10.1" version: "1.10.1"
stack_trace: stack_trace:
@ -227,7 +227,7 @@ packages:
description: description:
name: stack_trace name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.12.1" version: "1.12.1"
stream_channel: stream_channel:
@ -235,7 +235,7 @@ packages:
description: description:
name: stream_channel name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
string_scanner: string_scanner:
@ -243,7 +243,7 @@ packages:
description: description:
name: string_scanner name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.4.1" version: "1.4.1"
sync_http: sync_http:
@ -251,7 +251,7 @@ packages:
description: description:
name: sync_http name: sync_http
sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.3.1" version: "0.3.1"
term_glyph: term_glyph:
@ -259,7 +259,7 @@ packages:
description: description:
name: term_glyph name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.2.2" version: "1.2.2"
test_api: test_api:
@ -267,7 +267,7 @@ packages:
description: description:
name: test_api name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.7.6" version: "0.7.6"
typed_data: typed_data:
@ -275,7 +275,7 @@ packages:
description: description:
name: typed_data name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.4.0" version: "1.4.0"
vector_math: vector_math:
@ -283,7 +283,7 @@ packages:
description: description:
name: vector_math name: vector_math
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.2.0" version: "2.2.0"
vm_service: vm_service:
@ -291,7 +291,7 @@ packages:
description: description:
name: vm_service name: vm_service
sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "15.0.2" version: "15.0.2"
web: web:
@ -299,7 +299,7 @@ packages:
description: description:
name: web name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.1.1" version: "1.1.1"
webdriver: webdriver:
@ -307,7 +307,7 @@ packages:
description: description:
name: webdriver name: webdriver
sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade"
url: "https://pub.dev"
url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
sdks: sdks:

2
pubspec.yaml

@ -66,7 +66,7 @@ dependencies:
audioplayers: ^6.5.1 audioplayers: ^6.5.1
video_thumbnail: ^0.5.3 # 视频缩略图生成 video_thumbnail: ^0.5.3 # 视频缩略图生成
fluwx: ^5.7.5 fluwx: ^5.7.5
# tobias: ^5.3.1
# # tobias: ^5.3.1
agora_rtc_engine: ^6.5.3 agora_rtc_engine: ^6.5.3
agora_rtm: ^2.2.5 agora_rtm: ^2.2.5
agora_token_generator: ^1.0.0 agora_token_generator: ^1.0.0

6
scripts/build_android.sh

@ -42,7 +42,11 @@ echo "📚 获取依赖..."
flutter pub get flutter pub get
echo "🤖 开始构建 Android APK..." echo "🤖 开始构建 Android APK..."
flutter build apk --release "${EXTRA_ARGS[@]}"
if [[ ${#EXTRA_ARGS[@]} -gt 0 ]]; then
flutter build apk --release "${EXTRA_ARGS[@]}"
else
flutter build apk --release
fi
popd >/dev/null popd >/dev/null
ARTIFACT_DIR="$PROJECT_ROOT/build/app/outputs/flutter-apk" ARTIFACT_DIR="$PROJECT_ROOT/build/app/outputs/flutter-apk"

20
scripts/build_ios.sh

@ -42,8 +42,22 @@ echo "📚 获取依赖..."
flutter pub get flutter pub get
echo "🚀 开始构建 iOS 安装包..." echo "🚀 开始构建 iOS 安装包..."
flutter build ios --release --build-dir "$OUTPUT_DIR" "${EXTRA_ARGS[@]}"
if [[ ${#EXTRA_ARGS[@]} -gt 0 ]]; then
flutter build ios --release "${EXTRA_ARGS[@]}"
else
flutter build ios --release
fi
# iOS build output is typically in build/ios/iphoneos/
BUILD_OUTPUT_DIR="$PROJECT_ROOT/build/ios/iphoneos"
if [[ -d "$BUILD_OUTPUT_DIR" ]]; then
echo "📦 复制构建产物到输出目录..."
mkdir -p "$OUTPUT_DIR"
cp -R "$BUILD_OUTPUT_DIR"/* "$OUTPUT_DIR/" 2>/dev/null || true
echo "✅ 构建完成,产物目录:$OUTPUT_DIR"
else
echo "⚠️ 警告: 未找到预期的构建输出目录 $BUILD_OUTPUT_DIR"
echo "构建产物可能在:$PROJECT_ROOT/build/ios/"
fi
popd >/dev/null popd >/dev/null
echo "✅ 构建完成,产物目录:$OUTPUT_DIR"
Loading…
Cancel
Save