From 6e09a6fee336bb0c03527c1d5dde1092ed48fdb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Fri, 9 Jan 2026 14:34:42 +0800 Subject: [PATCH 01/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=AE=BF=E5=AE=A2?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.kotlin/errors/errors-1767939772073.log | 198 ++++++++++++++++++ lib/pages/discover/visitor_list_page.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 200 insertions(+), 2 deletions(-) create mode 100644 android/.kotlin/errors/errors-1767939772073.log diff --git a/android/.kotlin/errors/errors-1767939772073.log b/android/.kotlin/errors/errors-1767939772073.log new file mode 100644 index 0000000..ab63436 --- /dev/null +++ b/android/.kotlin/errors/errors-1767939772073.log @@ -0,0 +1,198 @@ +kotlin version: 2.1.0 +error message: Daemon compilation failed: null +java.lang.Exception + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:69) + at org.jetbrains.kotlin.daemon.common.CompileService$CallResult$Error.get(CompileService.kt:65) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemon(GradleKotlinCompilerWork.kt:240) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.compileWithDaemonOrFallbackImpl(GradleKotlinCompilerWork.kt:159) + at org.jetbrains.kotlin.compilerRunner.GradleKotlinCompilerWork.run(GradleKotlinCompilerWork.kt:111) + at org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction.execute(GradleCompilerRunnerWithWorkers.kt:76) + at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:63) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:66) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.create(NoIsolationWorkerFactory.java:62) + at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:100) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.lambda$execute$0(NoIsolationWorkerFactory.java:62) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44) + at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:209) + at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:204) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66) + at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:59) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:166) + at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:59) + at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:53) + at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41) + at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:59) + at org.gradle.workers.internal.DefaultWorkerExecutor.lambda$submitWork$0(DefaultWorkerExecutor.java:174) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:194) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.access$700(DefaultConditionalExecutionQueue.java:127) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner$1.run(DefaultConditionalExecutionQueue.java:169) + at org.gradle.internal.Factories$1.create(Factories.java:31) + at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:263) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:127) + at org.gradle.internal.work.DefaultWorkerLeaseService.runAsWorkerThread(DefaultWorkerLeaseService.java:132) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164) + at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:133) + at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) + at java.base/java.util.concurrent.FutureTask.run(Unknown Source) + at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) + at org.gradle.internal.concurrent.AbstractManagedExecutor$1.run(AbstractManagedExecutor.java:48) + at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) + at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) + at java.base/java.lang.Thread.run(Unknown Source) +Caused by: java.lang.AssertionError: java.lang.Exception: Could not close incremental caches in D:\www\dating_touchme_app\build\emoji_picker_flutter\kotlin\compileReleaseKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:236) + at org.jetbrains.kotlin.incremental.IncrementalCachesManager.close(IncrementalCachesManager.kt:55) + at kotlin.io.CloseableKt.closeFinally(Closeable.kt:56) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileNonIncrementally(IncrementalCompilerRunner.kt:293) + at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:129) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:674) + at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:91) + at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1659) + at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source) + at java.base/java.lang.reflect.Method.invoke(Unknown Source) + at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.rmi/sun.rmi.transport.Transport$1.run(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.Transport.serviceCall(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(Unknown Source) + at java.base/java.security.AccessController.doPrivileged(Unknown Source) + at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source) + ... 3 more +Caused by: java.lang.Exception: Could not close incremental caches in D:\www\dating_touchme_app\build\emoji_picker_flutter\kotlin\compileReleaseKotlin\cacheable\caches-jvm\jvm\kotlin: class-fq-name-to-source.tab, source-to-classes.tab, internal-name-to-source.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.com.google.common.io.Closer.close(Closer.java:223) + ... 22 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:443) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:999) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:451) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:33) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.save(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:151) + at org.jetbrains.kotlin.incremental.storage.AppendableCollectionExternalizer.save(LazyStorage.kt:142) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:443) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\www\dating_touchme_app\build\emoji_picker_flutter\kotlin\compileReleaseKotlin\cacheable\caches-jvm\lookups: id-to-file.tab, file-to-id.tab + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:95) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.close(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.LookupStorage.close(LookupStorage.kt:155) + ... 23 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:51) + at org.jetbrains.kotlin.incremental.storage.LegacyFileExternalizer.save(IdToFileMap.kt:48) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:443) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:999) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:451) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.PersistentStorageWrapper.close(PersistentStorage.kt:124) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 25 more + Suppressed: java.lang.Exception: Could not close incremental caches in D:\www\dating_touchme_app\build\emoji_picker_flutter\kotlin\compileReleaseKotlin\cacheable\caches-jvm\inputs: source-to-output.tab + ... 25 more + Suppressed: java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\Administrator\AppData\Local\Pub\Cache\hosted\pub.flutter-io.cn\emoji_picker_flutter-4.4.0\android\src\main\kotlin\com\fintasys\emoji_picker_flutter\EmojiPickerFlutterPlugin.kt and D:\www\dating_touchme_app\android. + at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) + at kotlin.io.FilesKt__UtilsKt.relativeTo(Utils.kt:128) + at org.jetbrains.kotlin.incremental.storage.RelocatableFileToPathConverter.toPath(RelocatableFileToPathConverter.kt:24) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:50) + at org.jetbrains.kotlin.incremental.storage.FileDescriptor.getHashCode(FileToPathConverter.kt:30) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.hashKey(LinkedCustomHashMap.java:109) + at org.jetbrains.kotlin.com.intellij.util.containers.LinkedCustomHashMap.remove(LinkedCustomHashMap.java:153) + at org.jetbrains.kotlin.com.intellij.util.containers.SLRUMap.remove(SLRUMap.java:89) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.flushAppendCache(PersistentMapImpl.java:999) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.doPut(PersistentMapImpl.java:451) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentMapImpl.put(PersistentMapImpl.java:422) + at org.jetbrains.kotlin.com.intellij.util.io.PersistentHashMap.put(PersistentHashMap.java:105) + at org.jetbrains.kotlin.incremental.storage.LazyStorage.set(LazyStorage.kt:80) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.applyChanges(InMemoryStorage.kt:108) + at org.jetbrains.kotlin.incremental.storage.AppendableInMemoryStorage.applyChanges(InMemoryStorage.kt:179) + at org.jetbrains.kotlin.incremental.storage.InMemoryStorage.close(InMemoryStorage.kt:136) + at org.jetbrains.kotlin.incremental.storage.AppendableSetBasicMap.close(BasicMap.kt:157) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner$close$1.invoke(BasicMapsOwner.kt:53) + at org.jetbrains.kotlin.incremental.storage.BasicMapsOwner.forEachMapSafe(BasicMapsOwner.kt:87) + ... 24 more + + diff --git a/lib/pages/discover/visitor_list_page.dart b/lib/pages/discover/visitor_list_page.dart index b993f23..c8f04e6 100644 --- a/lib/pages/discover/visitor_list_page.dart +++ b/lib/pages/discover/visitor_list_page.dart @@ -196,7 +196,7 @@ class VisitorItem extends StatelessWidget { ) ], ).onTap((){ - Get.to(() => UserInformationPage(miId: visitor.miId, userId: GlobalData().userId!)); + Get.to(() => UserInformationPage(miId: visitor.miId, userId: visitor.userId!)); }); } diff --git a/pubspec.yaml b/pubspec.yaml index 79bddb4..64acfe9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -148,4 +148,4 @@ flutter_launcher_icons: ios: true image_path: "assets/images/app_logo.jpg" min_sdk_android: 21 - remove_alpha_ios: true + remove_alpha_ios: true \ No newline at end of file From 6afb53307bc1bf1badd2024ac7685606ece2f625 Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Fri, 9 Jan 2026 18:21:36 +0800 Subject: [PATCH 02/24] no message --- lib/controller/mine/mine_controller.dart | 16 ++- lib/pages/mine/mine_page.dart | 161 +++++++++++++++++++---- 2 files changed, 154 insertions(+), 23 deletions(-) diff --git a/lib/controller/mine/mine_controller.dart b/lib/controller/mine/mine_controller.dart index 29e765b..8d41e7e 100644 --- a/lib/controller/mine/mine_controller.dart +++ b/lib/controller/mine/mine_controller.dart @@ -4,9 +4,11 @@ import 'package:dating_touchme_app/model/mine/user_count_data.dart'; import 'package:dating_touchme_app/network/user_api.dart'; import 'package:dating_touchme_app/pages/mine/auth_center_page.dart'; import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart'; +import 'package:dating_touchme_app/pages/mine/real_name_page.dart'; import 'package:dating_touchme_app/pages/mine/rose_page.dart'; import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart'; import 'package:dating_touchme_app/pages/setting/match_spread_page.dart'; +import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; import '../../pages/setting/setting_page.dart'; @@ -20,7 +22,7 @@ class MineController extends GetxController { {"icon": Assets.imagesWallet, "title": "我的钱包", "subTitle": "提现无门槛", "path": () => MyWalletPage()}, // {"icon": Assets.imagesShop, "title": "商城中心", "subTitle": "不定期更新商品", "path": () => null}, {"icon": Assets.imagesCert, "title": "认证中心", "subTitle": GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", "path": () => AuthCenterPage()}, - {"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": () => MatchSpreadPage()}, + {"icon": Assets.imagesMatchmaker, "title": "红娘等级", "subTitle": "实习红娘", "path": 'MatchSpreadPage'}, ].obs; final settingList = [ @@ -36,6 +38,8 @@ class MineController extends GetxController { late UserApi _userApi; + + @override void onInit() { super.onInit(); @@ -44,4 +48,14 @@ class MineController extends GetxController { _userApi = Get.find(); } + void registerMatch() async { + if (GlobalData().userData!.identityCard != null && + GlobalData().userData!.identityCard!.isNotEmpty) { + await Get.to(() => MatchSpreadPage()); + } else { + SmartDialog.showToast('请先进行实名认证'); + await Get.to(() => RealNamePage(type: 1)); + } + } + } \ No newline at end of file diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index 6e0b674..35a8e3d 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -4,14 +4,20 @@ import 'package:dating_touchme_app/controller/mine/mine_controller.dart'; import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:dating_touchme_app/model/mine/user_count_data.dart'; import 'package:dating_touchme_app/network/user_api.dart'; +import 'package:dating_touchme_app/pages/mine/auth_center_page.dart'; import 'package:dating_touchme_app/pages/mine/edit_info_page.dart'; import 'package:dating_touchme_app/pages/mine/my_friend_page.dart'; +import 'package:dating_touchme_app/pages/mine/my_wallet_page.dart'; +import 'package:dating_touchme_app/pages/mine/rose_page.dart'; +import 'package:dating_touchme_app/pages/mine/user_help_center_page.dart'; import 'package:dating_touchme_app/pages/mine/vip_page.dart'; +import 'package:dating_touchme_app/pages/setting/setting_page.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:dating_touchme_app/generated/assets.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; import '../discover/visitor_list_page.dart'; @@ -80,9 +86,13 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ } } + @override Widget build(BuildContext context) { super.build(context); + var cellStyle = TDCellStyle.cellStyle(context); + cellStyle.cardPadding = EdgeInsets.symmetric(horizontal: 0); + cellStyle.padding = EdgeInsets.only(left: 16, top: 12, bottom: 12, right: 12); return GetX( init: MineController(), builder: (controller) { @@ -223,7 +233,7 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ ), SizedBox(height: 16.w,), Container( - height: 57.w, + // height: 57.w, padding: EdgeInsets.only( top: 11.w, right: 42.w, @@ -266,27 +276,132 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ ], ), SizedBox(height: 12.w,), - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(9.w)), - child: Column( - children: [ - ...controller.blockList.map((e){ - return BlockItem(item: e, showWaring: e["title"] == "认证中心" && (GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null), path: e["path"],); - }), - ], - ), + // ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(9.w)), + // child: Column( + // children: [ + // ...controller.blockList.map((e){ + // return BlockItem(item: e, showWaring: e["title"] == "认证中心" && (GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null), path: e["path"],); + // }), + // ], + // ), + // ), + + TDCellGroup( + theme: TDCellGroupTheme.cardTheme, + style: cellStyle, + cells: [ + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesRose, height: 22.w, width: 22.w), + titleWidget: Text( + "我的玫瑰", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + Get.to(() => RosePage()); + } + ), + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesWallet, height: 22.w, width: 22.w), + titleWidget: Text( + "我的钱包", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + Get.to(() => MyWalletPage()); + } + ), + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesCert, height: 22.w, width: 22.w), + titleWidget: Text( + "认证中心", + style: TextStyle( + fontSize: 14.w + ), + ), + noteWidget: Row( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + if(GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null) TDBadge(TDBadgeType.redPoint), + SizedBox(width: 5.w, height: 9.w), + Text( + GlobalData().userData?.identityCard == null || GlobalData().userData?.profilePhoto == null ? "未认证" : "已认证", + style: TextStyle(fontSize: 12.w, color: const Color.fromRGBO(166, 166, 166, 1)), + ) + ], + ), + onClick: (cell) { + Get.to(() => AuthCenterPage()); + } + ), + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesMatchmaker, height: 22.w, width: 22.w), + titleWidget: Text( + "红娘等级", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + controller.registerMatch(); + } + ), + ], ), + SizedBox(height: 12.w,), - ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(9.w)), - child: Column( - children: [ - ...controller.settingList.map((e){ - return SettingItem(item: e, path: e["path"],); - }) - ], - ), + + TDCellGroup( + theme: TDCellGroupTheme.cardTheme, + style: cellStyle, + cells: [ + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesSetting, height: 22.w, width: 22.w), + titleWidget: Text( + "设置", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + Get.to(() => SettingPage()); + } + ), + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesCustomer, height: 22.w, width: 22.w), + titleWidget: Text( + "联系客服", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + SmartDialog.showToast('功能暂未开放'); + } + ), + TDCell(arrow: true, + leftIconWidget: Image.asset(Assets.imagesMail, height: 22.w, width: 22.w), + titleWidget: Text( + "意见反馈", + style: TextStyle( + fontSize: 14.w + ), + ), onClick: (cell) { + Get.to(() => UserHelpCenterPage()); + } + ), + ], ), + // ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(9.w)), + // child: Column( + // children: [ + // ...controller.settingList.map((e){ + // return SettingItem(item: e, path: e["path"],); + // }) + // ], + // ), + // ), ], ), ); @@ -329,7 +444,7 @@ class _InfoItemState extends State { Text( "${widget.item["num"]}", style: TextStyle( - fontSize: 15.w, + fontSize: 18.w, color: Colors.black, fontWeight: FontWeight.w700 ), @@ -394,7 +509,9 @@ class _BlockItemState extends State { return InkWell( onTap: (){ // context.pushNamed(widget.path); - if(widget.path() != null){ + if(widget.path() == 'MatchSpreadPage'){ + + } else if(widget.path() != null){ Get.to(widget.path)?.then((e){ setState(() { @@ -402,7 +519,7 @@ class _BlockItemState extends State { }); } else { - SmartDialog.showToast('功能暂未开放'); + SmartDialog.showToast('功能暂未开放'); } // RouteGuardService.to.toWithAuth(widget.path, null); }, From eca0a3fd5a916fcd15b53e756de7e1dfe1b7a8c6 Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Sat, 10 Jan 2026 00:09:33 +0800 Subject: [PATCH 03/24] =?UTF-8?q?fix(call):=20=E6=B7=BB=E5=8A=A0=E5=BF=99?= =?UTF-8?q?=E7=BA=BF=E6=8F=90=E7=A4=BA=E5=B9=B6=E4=BC=98=E5=8C=96=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=BE=93=E5=85=A5=E6=A1=86=E8=A1=A8=E6=83=85=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加对方忙线中提示功能 - 移除过期的extended_text_field依赖 - 实现新的表情显示机制替换原有特殊文本构建器 - 重构聊天输入框表情处理逻辑 - 优化输入框光标位置管理 - 添加表情输入内容构建方法 --- lib/controller/message/call_controller.dart | 4 + lib/widget/message/chat_input_bar.dart | 257 ++++++++------------ pubspec.yaml | 1 + 3 files changed, 103 insertions(+), 159 deletions(-) diff --git a/lib/controller/message/call_controller.dart b/lib/controller/message/call_controller.dart index cb7f7f8..bc94f03 100644 --- a/lib/controller/message/call_controller.dart +++ b/lib/controller/message/call_controller.dart @@ -184,6 +184,10 @@ class CallController extends GetxController { }); return null; } + if (!response.data.data!.success && response.data.data!.code == 'E0003') { + SmartDialog.showToast('对方忙线中'); + return null; + } rtcChannel.value = response.data.data; print('✅ 创建一对一RTC频道成功: ${response.data.data?.channelId}'); isCreatingChannel.value = false; diff --git a/lib/widget/message/chat_input_bar.dart b/lib/widget/message/chat_input_bar.dart index db31b12..bfbd66a 100644 --- a/lib/widget/message/chat_input_bar.dart +++ b/lib/widget/message/chat_input_bar.dart @@ -1,8 +1,6 @@ import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:extended_text_field/extended_text_field.dart'; import '../../generated/assets.dart'; import '../../config/emoji_config.dart'; @@ -10,135 +8,6 @@ import '../emoji_panel.dart'; import 'more_options_view.dart'; import 'voice_input_view.dart'; -/// 表情特殊文本构建器 - 用于在 ExtendedTextField 中显示表情 -class EmojiSpecialTextSpanBuilder extends SpecialTextSpanBuilder { - @override - SpecialText? createSpecialText( - String flag, { - TextStyle? textStyle, - SpecialTextGestureTapCallback? onTap, - required int index, - }) { - // 匹配 [emoji:xxx] 格式 - if (flag.startsWith('[emoji:')) { - return EmojiSpecialText( - textStyle: textStyle, - onTap: onTap, - ); - } - return null; - } -} - -/// 表情特殊文本类 -class EmojiSpecialText extends SpecialText { - EmojiSpecialText({ - TextStyle? textStyle, - SpecialTextGestureTapCallback? onTap, - }) : super( - '[emoji:', - ']', - textStyle, - onTap: onTap, - ); - - @override - InlineSpan finishText() { - // 提取表情ID - final emojiId = toString().replaceAll('[emoji:', '').replaceAll(']', ''); - final emoji = EmojiConfig.getEmojiById(emojiId); - - if (emoji != null) { - // 返回包含表情图片的 WidgetSpan - return WidgetSpan( - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 2.w), - child: Image.asset( - emoji.path, - width: 24.w, - height: 24.w, - fit: BoxFit.contain, - ), - ), - ); - } - - // 如果表情不存在,返回普通文本 - return TextSpan( - text: toString(), - style: textStyle, - ); - } -} - -/// 表情文本输入格式化器 - 处理删除时一次性删除整个表情标记 -class EmojiTextInputFormatter extends TextInputFormatter { - @override - TextEditingValue formatEditUpdate( - TextEditingValue oldValue, - TextEditingValue newValue, - ) { - // 如果文本长度减少(删除操作) - if (newValue.text.length < oldValue.text.length) { - final oldSelection = oldValue.selection; - final cursorOffset = oldSelection.baseOffset; - final deletedLength = oldValue.text.length - newValue.text.length; - - // 在整个文本中查找所有表情标记 - final emojiRegex = RegExp(r'\[emoji:\d+\]'); - final allMatches = emojiRegex.allMatches(oldValue.text); - - // 查找光标所在位置或光标前最近的表情标记 - for (final match in allMatches) { - final emojiStart = match.start; - final emojiEnd = match.end; - - // 如果光标在表情标记内部(不包括开始位置,包括结束位置) - if (cursorOffset > emojiStart && cursorOffset <= emojiEnd) { - // 删除整个表情标记 - final beforeEmoji = oldValue.text.substring(0, emojiStart); - final afterEmoji = oldValue.text.substring(emojiEnd); - final newText = beforeEmoji + afterEmoji; - - // 删除表情后,光标保持在删除操作发生的位置 - // 跟删除普通文本一样:删除后光标停留在删除位置 - // 光标位置 = 删除位置 - 表情长度 - final emojiLength = emojiEnd - emojiStart; - int newCursorOffset = (cursorOffset - emojiLength).clamp(0, newText.length); - - return TextEditingValue( - text: newText, - selection: TextSelection.collapsed(offset: newCursorOffset), - ); - } - - // 如果光标刚好在表情标记的开始位置,且删除的是表情标记内部的字符 - if (cursorOffset == emojiStart) { - // 检查删除的字符是否在表情标记范围内 - if (cursorOffset + deletedLength <= emojiEnd) { - // 删除整个表情标记 - final beforeEmoji = oldValue.text.substring(0, emojiStart); - final afterEmoji = oldValue.text.substring(emojiEnd); - final newText = beforeEmoji + afterEmoji; - - // 删除表情后,光标保持在删除位置 - // 光标位置 = 删除位置 - 表情长度 - final emojiLength = emojiEnd - emojiStart; - int newCursorOffset = (cursorOffset - emojiLength).clamp(0, newText.length); - - return TextEditingValue( - text: newText, - selection: TextSelection.collapsed(offset: newCursorOffset), - ); - } - } - } - } - - return newValue; - } -} - class ChatInputBar extends StatefulWidget { final ValueChanged onSendMessage; final ValueChanged>? onImageSelected; @@ -260,15 +129,71 @@ class _ChatInputBarState extends State { // 将表情添加到输入框 final currentText = _textController.text; final emojiText = '[emoji:${emoji.id}]'; - final newText = currentText + emojiText; - _textController.text = newText; + _textController.text = currentText + emojiText; // 将光标移到末尾 _textController.selection = TextSelection.fromPosition( - TextPosition(offset: newText.length), + TextPosition(offset: _textController.text.length), ); setState(() {}); // 刷新显示 } + /// 构建输入框内容(文本+表情) + List _buildInputContentWidgets() { + final List widgets = []; + final text = _textController.text; + final RegExp emojiRegex = RegExp(r'\[emoji:(\d+)\]'); + + int lastMatchEnd = 0; + final matches = emojiRegex.allMatches(text); + + for (final match in matches) { + // 添加表情之前的文本 + if (match.start > lastMatchEnd) { + final textPart = text.substring(lastMatchEnd, match.start); + widgets.add( + Text( + textPart, + style: TextStyle(fontSize: 14.sp, color: Colors.black), + ), + ); + } + + // 添加表情图片 + final emojiId = match.group(1); + if (emojiId != null) { + final emoji = EmojiConfig.getEmojiById(emojiId); + if (emoji != null) { + widgets.add( + Padding( + padding: EdgeInsets.symmetric(horizontal: 2.w), + child: Image.asset( + emoji.path, + width: 24.w, + height: 24.w, + fit: BoxFit.contain, + ), + ), + ); + } + } + + lastMatchEnd = match.end; + } + + // 添加剩余的文本 + if (lastMatchEnd < text.length) { + final textPart = text.substring(lastMatchEnd); + widgets.add( + Text( + textPart, + style: TextStyle(fontSize: 14.sp, color: Colors.black), + ), + ); + } + + return widgets; + } + @override Widget build(BuildContext context) { return Column( @@ -290,32 +215,46 @@ class _ChatInputBarState extends State { borderRadius: BorderRadius.circular(5.h), ), padding: EdgeInsets.symmetric(horizontal: 16.w), - alignment: Alignment.center, - child: ExtendedTextField( - controller: _textController, - focusNode: _focusNode, - specialTextSpanBuilder: EmojiSpecialTextSpanBuilder(), - inputFormatters: [ - EmojiTextInputFormatter(), - ], - textAlignVertical: TextAlignVertical.center, - decoration: InputDecoration( - border: InputBorder.none, - hintText: "请输入聊天内容~", - hintStyle: TextStyle( - fontSize: 14.sp, - color: Colors.grey, + child: Stack( + children: [ + // 真实的输入框 + TextField( + controller: _textController, + focusNode: _focusNode, + decoration: InputDecoration( + border: InputBorder.none, + hintText: "请输入聊天内容~", + hintStyle: TextStyle( + fontSize: 14.sp, + color: Colors.grey, + ), + ), + style: TextStyle( + fontSize: 14.sp, + color: _textController.text.contains('[emoji:') + ? Colors.transparent + : Colors.black, + ), + onChanged: (value) { + setState(() {}); // 刷新以更新表情显示 + }, ), - isDense: true, - contentPadding: EdgeInsets.symmetric(vertical: 0), - ), - style: TextStyle( - fontSize: 14.sp, - color: Colors.black, - ), - onChanged: (value) { - setState(() {}); // 刷新以更新表情显示 - }, + // 表情显示层 + if (_textController.text.contains('[emoji:')) + Positioned.fill( + child: IgnorePointer( + child: Align( + alignment: Alignment.centerLeft, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + child: Row( + children: _buildInputContentWidgets(), + ), + ), + ), + ), + ), + ], ), ), ), diff --git a/pubspec.yaml b/pubspec.yaml index 64acfe9..58be826 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -82,6 +82,7 @@ dependencies: flutter_local_notifications: ^19.5.0 app_badge_plus: ^1.2.6 extended_text_field: ^16.0.2 + emoji_text_field: ^1.0.0 dev_dependencies: flutter_test: From 4f8d430575bf4c063776d63e338dab61fa04e2c6 Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Sat, 10 Jan 2026 20:02:07 +0800 Subject: [PATCH 04/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=AD=E7=BD=91?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .fvmrc | 3 +++ .gitignore | 2 ++ .vscode/settings.json | 3 +++ lib/network/network_config.dart | 3 +++ 4 files changed, 11 insertions(+) create mode 100644 .fvmrc create mode 100644 .vscode/settings.json diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 0000000..2bb4682 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.35.2" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2ea8576..e87fe79 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ doc/api/ /android/app/profile /android/app/release +# FVM Version Cache +.fvm/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..97f1308 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dart.flutterSdkPath": ".fvm/versions/3.35.2" +} \ No newline at end of file diff --git a/lib/network/network_config.dart b/lib/network/network_config.dart index 079b1a7..9cc2447 100644 --- a/lib/network/network_config.dart +++ b/lib/network/network_config.dart @@ -145,6 +145,9 @@ class ResponseInterceptor extends Interceptor { case DioExceptionType.cancel: errorMessage = '请求已取消'; break; + case DioExceptionType.connectionError: + errorMessage = '网络连接失败'; + break; default: errorMessage = err.message ?? '未知错误'; } From a78693c6e7e0ae240725d6dbbbb070347e1473aa Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Sat, 10 Jan 2026 23:34:44 +0800 Subject: [PATCH 05/24] =?UTF-8?q?feat(chat):=20=E6=9B=BF=E6=8D=A2=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E8=BE=93=E5=85=A5=E6=A1=86=E4=B8=BA=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E5=AD=97=E6=AE=B5=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E8=A1=A8=E6=83=85=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 集成 extended_text 和 extended_text_field 依赖包 - 移除自定义表情渲染逻辑和 _buildInputContentWidgets 方法 - 将 TextField 替换为 ExtendedTextField 组件 - 添加 MySpecialTextSpanBuilder 类处理特殊文本标记 - 实现 MyEmojiText 类解析 [emoji:id] 格式并渲染表情图片 - 配置 ImageSpan 显示表情图像并设置合适的尺寸 - 添加输入格式化器过滤零宽空格字符 --- lib/widget/message/chat_input_bar.dart | 168 ++++++++++++++----------- pubspec.yaml | 1 + 2 files changed, 93 insertions(+), 76 deletions(-) diff --git a/lib/widget/message/chat_input_bar.dart b/lib/widget/message/chat_input_bar.dart index bfbd66a..1bc1875 100644 --- a/lib/widget/message/chat_input_bar.dart +++ b/lib/widget/message/chat_input_bar.dart @@ -1,5 +1,8 @@ import 'package:dating_touchme_app/extension/ex_widget.dart'; +import 'package:extended_text/extended_text.dart'; +import 'package:extended_text_field/extended_text_field.dart'; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import '../../generated/assets.dart'; @@ -137,63 +140,6 @@ class _ChatInputBarState extends State { setState(() {}); // 刷新显示 } - /// 构建输入框内容(文本+表情) - List _buildInputContentWidgets() { - final List widgets = []; - final text = _textController.text; - final RegExp emojiRegex = RegExp(r'\[emoji:(\d+)\]'); - - int lastMatchEnd = 0; - final matches = emojiRegex.allMatches(text); - - for (final match in matches) { - // 添加表情之前的文本 - if (match.start > lastMatchEnd) { - final textPart = text.substring(lastMatchEnd, match.start); - widgets.add( - Text( - textPart, - style: TextStyle(fontSize: 14.sp, color: Colors.black), - ), - ); - } - - // 添加表情图片 - final emojiId = match.group(1); - if (emojiId != null) { - final emoji = EmojiConfig.getEmojiById(emojiId); - if (emoji != null) { - widgets.add( - Padding( - padding: EdgeInsets.symmetric(horizontal: 2.w), - child: Image.asset( - emoji.path, - width: 24.w, - height: 24.w, - fit: BoxFit.contain, - ), - ), - ); - } - } - - lastMatchEnd = match.end; - } - - // 添加剩余的文本 - if (lastMatchEnd < text.length) { - final textPart = text.substring(lastMatchEnd); - widgets.add( - Text( - textPart, - style: TextStyle(fontSize: 14.sp, color: Colors.black), - ), - ); - } - - return widgets; - } - @override Widget build(BuildContext context) { return Column( @@ -218,7 +164,7 @@ class _ChatInputBarState extends State { child: Stack( children: [ // 真实的输入框 - TextField( + ExtendedTextField( controller: _textController, focusNode: _focusNode, decoration: InputDecoration( @@ -229,31 +175,19 @@ class _ChatInputBarState extends State { color: Colors.grey, ), ), + inputFormatters: [ + // 可以添加其他格式化器,但不要添加过滤Unicode的规则 + FilteringTextInputFormatter.deny(RegExp(r'[\u200B]')), // 仅示例:过滤零宽空格 + ], + specialTextSpanBuilder: MySpecialTextSpanBuilder(), style: TextStyle( fontSize: 14.sp, - color: _textController.text.contains('[emoji:') - ? Colors.transparent - : Colors.black, + color: Colors.black, // 文字始终显示为黑色,specialTextSpanBuilder 会处理表情 ), onChanged: (value) { setState(() {}); // 刷新以更新表情显示 }, ), - // 表情显示层 - if (_textController.text.contains('[emoji:')) - Positioned.fill( - child: IgnorePointer( - child: Align( - alignment: Alignment.centerLeft, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: Row( - children: _buildInputContentWidgets(), - ), - ), - ), - ), - ), ], ), ), @@ -344,3 +278,85 @@ class _ChatInputBarState extends State { ); } } + + +/// 表情特殊文本构建器 - 参考 TIMUIKitTextField 的实现 +class MySpecialTextSpanBuilder extends SpecialTextSpanBuilder { + @override + SpecialText? createSpecialText( + String flag, { + TextStyle? textStyle, + SpecialTextGestureTapCallback? onTap, + required int index, + }) { + if (flag.isEmpty) { + return null; + } + + // index 是 start flag 的结束位置,所以文本开始位置应该是 index - (flag.length - 1) + // 使用 '[' 作为 startFlag,参考 EmojiText.flag = '[' + if (isStart(flag, MyEmojiText.flag)) { + return MyEmojiText( + textStyle, + start: index - (MyEmojiText.flag.length - 1), + ); + } + return null; + } +} + +/// 表情特殊文本类 - 参考 TIMUIKitTextField 的 EmojiText 实现 +class MyEmojiText extends SpecialText { + static const String flag = '['; + final int start; + + MyEmojiText( + TextStyle? textStyle, { + required this.start, + }) : super(MyEmojiText.flag, ']', textStyle); + + @override + InlineSpan finishText() { + // toString() 返回完整的匹配文本,例如 "[emoji:11]" + final String key = toString(); + + // 检查是否是我们的表情格式 [emoji:数字] + final RegExp emojiPattern = RegExp(r'^\[emoji:(\d+)\]$'); + final match = emojiPattern.firstMatch(key); + + if (match != null && match.groupCount > 0) { + final emojiId = match.group(1); + if (emojiId != null && emojiId.isNotEmpty) { + final emoji = EmojiConfig.getEmojiById(emojiId); + if (emoji != null && emoji.path.isNotEmpty) { + // 使用 ImageSpan,完全参考 TIMUIKitTextField 的实现 + double size = 16; + final TextStyle ts = textStyle!; + if (ts.fontSize != null) { + // 参考 TIMUIKitTextField: size = ts.fontSize! * 1.44 + // 但我们使用 flutter_screenutil,所以需要适配 + // 如果 fontSize 已经是适配后的值(如 14.sp),则直接计算 + size = ts.fontSize! * 1.44; + // 将 sp 单位转换为实际像素值,因为 ImageSpan 需要像素值 + // flutter_screenutil 的 .sp 会返回像素值,所以这里直接使用 + } else { + // 如果没有设置 fontSize,使用默认值 14.sp * 1.44 + size = 14.w * 1.44; + } + + return ImageSpan( + AssetImage(emoji.path), + actualText: key, + imageWidth: size, + imageHeight: size, + start: start, + margin: const EdgeInsets.all(0), // 零边距避免空格问题 + ); + } + } + } + + // 如果匹配失败或表情不存在,显示原始文本 + return TextSpan(text: key, style: textStyle); + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 58be826..378288a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -81,6 +81,7 @@ dependencies: ota_update: ^7.1.0 flutter_local_notifications: ^19.5.0 app_badge_plus: ^1.2.6 + extended_text: ^15.0.2 extended_text_field: ^16.0.2 emoji_text_field: ^1.0.0 From cd29f09b0889894692dec9146d714837eb5fb772 Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Sun, 11 Jan 2026 22:06:04 +0800 Subject: [PATCH 06/24] =?UTF-8?q?refactor(live=5Fchat):=20=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E7=BB=93=E6=9D=9F=E7=9B=B4=E6=92=AD=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 _handleEndLiveMessage 方法改为公共方法 handleEndLiveMessage - 在 RTCManager 中添加对主播离开频道的处理 - 当远端用户为主播且频道ID存在时自动离开频道 - 集成 LiveChatMessageService 处理结束直播消息 - 添加对 OverlayController 的检查和关闭逻辑 --- lib/rtc/rtc_manager.dart | 6 ++++++ lib/service/live_chat_message_service.dart | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/rtc/rtc_manager.dart b/lib/rtc/rtc_manager.dart index b6091e4..0e51098 100644 --- a/lib/rtc/rtc_manager.dart +++ b/lib/rtc/rtc_manager.dart @@ -9,6 +9,7 @@ import 'package:get/get.dart'; import '../controller/discover/room_controller.dart'; import '../controller/message/call_controller.dart'; import '../pages/discover/live_room_page.dart'; +import '../service/live_chat_message_service.dart'; enum RTCType { call, // 通话(语音/视频通话) @@ -208,6 +209,11 @@ class RTCManager { channelId != null && channelId.isNotEmpty) { final roomController = Get.find(); + if(remoteUid == roomController.rtcChannelDetail.value?.anchorInfo?.uid){ + await roomController.leaveChannel(); + // 调用 LiveChatMessageService 处理结束直播消息 + LiveChatMessageService.instance.handleEndLiveMessage(); + } await roomController.fetchRtcChannelDetail(channelId); } } diff --git a/lib/service/live_chat_message_service.dart b/lib/service/live_chat_message_service.dart index 4267e71..f0d4b73 100644 --- a/lib/service/live_chat_message_service.dart +++ b/lib/service/live_chat_message_service.dart @@ -72,7 +72,7 @@ class LiveChatMessageService { if (messageData['type'] == 'end_live') { RoomController controller = Get.find(); await controller.leaveChannel(); - _handleEndLiveMessage(); + handleEndLiveMessage(); return; } @@ -119,7 +119,7 @@ class LiveChatMessageService { } /// 处理结束直播消息 - void _handleEndLiveMessage() { + void handleEndLiveMessage() { try { // 检查 overlay 是否显示,如果显示则关闭 if (Get.isRegistered()) { From 05a3d6a84ede7c0022b67069493312017479e01e Mon Sep 17 00:00:00 2001 From: YakumoChen Date: Sun, 11 Jan 2026 22:31:29 +0800 Subject: [PATCH 07/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller/mine/auth_controller.dart | 29 +++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/lib/controller/mine/auth_controller.dart b/lib/controller/mine/auth_controller.dart index fcf8c7f..2d582f4 100644 --- a/lib/controller/mine/auth_controller.dart +++ b/lib/controller/mine/auth_controller.dart @@ -1,10 +1,12 @@ import 'dart:async'; import 'package:get/get.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; +import 'package:get_storage/get_storage.dart'; import '../../generated/assets.dart'; import '../../network/user_api.dart'; import '../../pages/setting/match_league_page.dart'; import '../../pages/setting/match_spread_page.dart'; +import '../discover/room_controller.dart'; import '../global.dart'; class AuthController extends GetxController { @@ -112,6 +114,13 @@ class AuthController extends GetxController { GlobalData().userData!.identityCard = idcard.value; GlobalData().userData!.name = name.value; SmartDialog.showToast('认证成功'); + getInfo(); + final RoomController _roomController; + _roomController = Get.isRegistered() + ? Get.find() + : Get.put(RoomController()); + + _roomController.matchmakerFlag.value = GlobalData().userData!.matchmakerFlag!; if(type == 1){ // 进入认证成功之后的下一个页面; Get.off(() => MatchSpreadPage()); @@ -122,12 +131,30 @@ class AuthController extends GetxController { SmartDialog.showToast(response.data.message); } } catch (e) { - SmartDialog.showToast('网络请求失败,请检查网络连接'); + // SmartDialog.showToast('网络请求失败,请检查网络连接'); + // SmartDialog.showToast(response.data.message); } finally { } } + + + getInfo() async { + final result = await _userApi.getMarriageInformationDetail(); + // print(result.data); + if (result.data.isSuccess) { + final information = result.data.data!; + information.matchmakerFlag = GlobalData().userData?.matchmakerFlag ?? false; + information.realName = GlobalData().userData?.realName; + information.phone = GlobalData().userData?.phone; + GlobalData().userData = information; + + await GetStorage().write('userId', GlobalData().userId); + + } + } + } class AuthCard { From 81a2ab50016dec43d8ac8c6ef9a14df1a4245038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 09:44:07 +0800 Subject: [PATCH 08/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller/mine/auth_controller.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/controller/mine/auth_controller.dart b/lib/controller/mine/auth_controller.dart index 2d582f4..909a948 100644 --- a/lib/controller/mine/auth_controller.dart +++ b/lib/controller/mine/auth_controller.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'package:dating_touchme_app/controller/home/home_controller.dart'; import 'package:get/get.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get_storage/get_storage.dart'; @@ -121,6 +122,11 @@ class AuthController extends GetxController { : Get.put(RoomController()); _roomController.matchmakerFlag.value = GlobalData().userData!.matchmakerFlag!; + + + final HomeController hController = Get.find(); + hController.refreshRecommendData(); + hController.refreshNearbyData(); if(type == 1){ // 进入认证成功之后的下一个页面; Get.off(() => MatchSpreadPage()); From 0bd44c10f5201da6140d75bb7e04e8b7b0339810 Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Mon, 12 Jan 2026 09:45:08 +0800 Subject: [PATCH 09/24] no message --- lib/pages/setting/setting_page.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/pages/setting/setting_page.dart b/lib/pages/setting/setting_page.dart index ebf8853..b04523d 100644 --- a/lib/pages/setting/setting_page.dart +++ b/lib/pages/setting/setting_page.dart @@ -26,6 +26,9 @@ class SettingPage extends StatelessWidget { @override Widget build(BuildContext context) { + var cellStyle = TDCellStyle.cellStyle(context); + cellStyle.cardPadding = EdgeInsets.symmetric(horizontal: 10); + cellStyle.padding = EdgeInsets.only(left: 16, top: 12, bottom: 12, right: 12); return Scaffold( backgroundColor: Color(0xffF5F5F5), appBar: PageAppbar(title: "设置"), @@ -36,6 +39,7 @@ class SettingPage extends StatelessWidget { children: [ TDCellGroup( theme: TDCellGroupTheme.cardTheme, + style: cellStyle, cells: [ TDCell( arrow: false, @@ -71,6 +75,7 @@ class SettingPage extends StatelessWidget { const SizedBox(height: 12), TDCellGroup( theme: TDCellGroupTheme.cardTheme, + style: cellStyle, cells: [ TDCell(arrow: true, titleWidget: Text( @@ -113,6 +118,7 @@ class SettingPage extends StatelessWidget { const SizedBox(height: 12), TDCellGroup( theme: TDCellGroupTheme.cardTheme, + style: cellStyle, cells: [ TDCell(arrow: true, titleWidget: Text( @@ -173,6 +179,7 @@ class SettingPage extends StatelessWidget { const SizedBox(height: 12), TDCellGroup( theme: TDCellGroupTheme.cardTheme, + style: cellStyle, cells: [ TDCell(arrow: true, titleWidget: Text( From af56859086620ce683aea6951372b4f825038591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 15:54:15 +0800 Subject: [PATCH 10/24] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/my_wallet_page.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pages/mine/my_wallet_page.dart b/lib/pages/mine/my_wallet_page.dart index 4477624..b59efba 100644 --- a/lib/pages/mine/my_wallet_page.dart +++ b/lib/pages/mine/my_wallet_page.dart @@ -357,6 +357,7 @@ class _InfoItemState extends State { widget.item.tradeType == 113 ? "邀请分成" : widget.item.tradeType == 114 ? "1V1语音" : widget.item.tradeType == 115 ? "1V1视频" : + widget.item.tradeType == 116 ? "连麦收益" : widget.item.tradeType == 201 ? "平台服务费" : widget.item.tradeType == 202 ? "提现" : ""}", style: TextStyle( From e810c648fabbfa4336542415e8f5ed4e587de3dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 16:16:04 +0800 Subject: [PATCH 11/24] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/rose_history_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/mine/rose_history_page.dart b/lib/pages/mine/rose_history_page.dart index aa2e1eb..da3aea6 100644 --- a/lib/pages/mine/rose_history_page.dart +++ b/lib/pages/mine/rose_history_page.dart @@ -277,7 +277,7 @@ class _ChatCouponItemState extends State { mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - widget.item.type == 1 ? "主动发起聊天" : "主动发起连麦", + widget.item.remark ?? "", style: TextStyle( fontSize: 13.w, color: const Color.fromRGBO(144, 144, 144, 1) From e403d9e2304b7fb58e8c8be2f6b53754e5794cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 16:22:51 +0800 Subject: [PATCH 12/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=8E=AB=E7=91=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/rose_history_page.dart | 41 ++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/lib/pages/mine/rose_history_page.dart b/lib/pages/mine/rose_history_page.dart index da3aea6..2ee79b4 100644 --- a/lib/pages/mine/rose_history_page.dart +++ b/lib/pages/mine/rose_history_page.dart @@ -237,8 +237,8 @@ class ChatCouponItem extends StatefulWidget { class _ChatCouponItemState extends State { @override Widget build(BuildContext context) { - return SizedBox( - height: 70.w, + return Container( + padding: EdgeInsets.symmetric(vertical: 15.w), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -272,25 +272,28 @@ class _ChatCouponItemState extends State { ) ], ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - widget.item.remark ?? "", - style: TextStyle( - fontSize: 13.w, - color: const Color.fromRGBO(144, 144, 144, 1) + SizedBox(width: 10.w,), + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + widget.item.remark ?? "", + style: TextStyle( + fontSize: 13.w, + color: const Color.fromRGBO(144, 144, 144, 1) + ), ), - ), - Text( - "-${widget.item.num}张", - style: TextStyle( - fontSize: 13.w, - color: const Color.fromRGBO(227, 84, 84, 1) + Text( + "-${widget.item.num}张", + style: TextStyle( + fontSize: 13.w, + color: const Color.fromRGBO(227, 84, 84, 1) + ), ), - ), - ], + ], + ), ), ], ), From f07ec264af9cb582c4de7ce6cd2eaf40f48d714d Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Mon, 12 Jan 2026 16:35:12 +0800 Subject: [PATCH 13/24] no message --- lib/controller/mine/edit_info_controller.dart | 12 +- lib/controller/setting/spread_controller.dart | 3 +- lib/pages/mine/mine_page.dart | 163 ------------------ lib/pages/mine/signature_page.dart | 107 ++++-------- 4 files changed, 42 insertions(+), 243 deletions(-) diff --git a/lib/controller/mine/edit_info_controller.dart b/lib/controller/mine/edit_info_controller.dart index 4fbcfd0..c64a737 100644 --- a/lib/controller/mine/edit_info_controller.dart +++ b/lib/controller/mine/edit_info_controller.dart @@ -607,11 +607,10 @@ class EditInfoController extends GetxController { savaDescribeInfo() async { try{ - - final originImg = userData.value!.photoList!.map((e) => e.photoUrl).toSet(); - final result = imgList - .where((e) => !originImg.contains(e)) - .toList(); + if(message.value.isEmpty){ + SmartDialog.showToast("请输入交友心声"); + return; + } final imgPayload = { 'miId': userData.value?.id ?? 0, 'authenticationCode': '7', @@ -624,15 +623,12 @@ class EditInfoController extends GetxController { realDescribe.value = message.value; getInfo(); SmartDialog.showToast("交友心声已提交审核"); - Get.back(); } else{ SmartDialog.showToast(imgAuditResp.data.message); - return; } } catch(e){ - print('相册提交审核失败: $e'); SmartDialog.showToast('交友心声提交审核失败,请重试'); return; diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index ca93e4c..a915015 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -65,7 +65,8 @@ class SpreadController extends GetxController with WidgetsBindingObserver { ]; } else if(roseList[activePay.value].subCategory == 88802){ revenue.value = [ - {'icon': '1', 'desc': '礼物收益固定40%,邀请嘉宾,嘉宾消费的分成10%'}, + {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, + {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, {'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'}, {'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'}, ]; diff --git a/lib/pages/mine/mine_page.dart b/lib/pages/mine/mine_page.dart index 35a8e3d..b8d0355 100644 --- a/lib/pages/mine/mine_page.dart +++ b/lib/pages/mine/mine_page.dart @@ -409,18 +409,11 @@ class _MinePageState extends State with AutomaticKeepAliveClientMixin{ ); } - @override // TODO: implement wantKeepAlive bool get wantKeepAlive => true; } - - - - - - class InfoItem extends StatefulWidget { final Map item; final Function getUserCount; @@ -491,160 +484,4 @@ class _InfoItemState extends State { }) ); } -} - -class BlockItem extends StatefulWidget { - final Map item; - final bool showWaring; - final Function path; - const BlockItem({super.key, required this.item, this.showWaring = false, required this.path}); - - @override - State createState() => _BlockItemState(); -} - -class _BlockItemState extends State { - @override - Widget build(BuildContext context) { - return InkWell( - onTap: (){ - // context.pushNamed(widget.path); - if(widget.path() == 'MatchSpreadPage'){ - - } else if(widget.path() != null){ - Get.to(widget.path)?.then((e){ - setState(() { - - }); - }); - } else { - - SmartDialog.showToast('功能暂未开放'); - } - // RouteGuardService.to.toWithAuth(widget.path, null); - }, - child: Container( - height: 48.w, - padding: EdgeInsets.only(left: 16.w), - decoration: BoxDecoration( - color: Colors.white - ), - child: Container( - padding: EdgeInsets.only(right: 16.w), - decoration: BoxDecoration( - border: widget.item["title"] != "红娘等级" ? Border( - bottom: BorderSide(width: 1, color: const Color.fromRGBO(238, 238, 238, 1)) - ) : null - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - widget.item["icon"], - height: 22.w, - width: 22.w, - ), - SizedBox(width: 16.w,), - Text( - widget.item["title"], - style: TextStyle( - fontSize: 14.w, - color: Colors.black, - fontWeight: FontWeight.w500 - ), - ) - ], - ), - Row( - children: [ - if(widget.showWaring) Container( - width: 5.w, - height: 5.w, - margin: EdgeInsets.only(right: 4.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5.w)), - color: const Color.fromRGBO(255, 87, 51, 1) - ), - ), - if(widget.item["title"] == "认证中心") Text( - widget.item["subTitle"], - style: TextStyle( - fontSize: 11.w, - color: const Color.fromRGBO(166, 166, 166, 1) - ), - ), - SizedBox(width: 10.w,), - Image.asset( - Assets.imagesArrow, - width: 4.w, - ) - ], - ) - ], - ), - ), - ), - ); - } -} - -class SettingItem extends StatefulWidget { - final Map item; - final Function path; - const SettingItem({super.key, required this.item, required this.path}); - - @override - State createState() => _SettingItemState(); -} - -class _SettingItemState extends State { - @override - Widget build(BuildContext context) { - return InkWell( - onTap: (){ - if(widget.path() == null){ - SmartDialog.showToast('功能暂未开放'); - return; - } - // context.pushNamed(widget.path); - Get.to(widget.path); - // RouteGuardService.to.toWithAuth(widget.path, null); - }, - child: Container( - height: 48.w, - padding: EdgeInsets.symmetric(horizontal: 16.w), - color: Colors.white, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - children: [ - Image.asset( - widget.item["icon"], - width: 24.w, - height: 24.w, - ), - SizedBox(width: 14.w,), - Text( - widget.item["title"], - style: TextStyle( - fontSize: 14.w, - fontWeight: FontWeight.w500, - color: Colors.black - ), - ) - ], - ), - Image.asset( - Assets.imagesArrow, - width: 4.w, - height: 8.w, - ) - ], - ), - ), - ); - } } \ No newline at end of file diff --git a/lib/pages/mine/signature_page.dart b/lib/pages/mine/signature_page.dart index 04849f8..0c66e4a 100644 --- a/lib/pages/mine/signature_page.dart +++ b/lib/pages/mine/signature_page.dart @@ -1,14 +1,12 @@ import 'package:dating_touchme_app/components/page_appbar.dart'; import 'package:dating_touchme_app/controller/mine/edit_info_controller.dart'; -import 'package:dating_touchme_app/extension/ex_widget.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:get/get.dart'; +import 'package:tdesign_flutter/tdesign_flutter.dart'; class SignaturePage extends StatelessWidget { const SignaturePage({super.key}); - @override Widget build(BuildContext context) { return GetX( @@ -16,75 +14,42 @@ class SignaturePage extends StatelessWidget { builder: (controller) { return Scaffold( appBar: PageAppbar(title: "交友心声",), - body: Container( - padding: EdgeInsets.all(17.w), - child: TextField( - controller: controller.messageController.value, - maxLength: 50, // 上限 - minLines: 5, // 多行 - maxLines: 5, // 自适应高度 - style: TextStyle( - fontSize: ScreenUtil().setWidth(13), - height: 1 - ), - decoration: InputDecoration( - contentPadding: EdgeInsets.symmetric( - vertical: 0, - horizontal: 0 - ), - hintText: "请输入交友心声", - - border: const OutlineInputBorder( - borderSide: BorderSide.none, // 这将移除边框 // 可选:设置圆角 - ), - // 如果你希望聚焦时和未聚焦时都没有边框,也可以设置 focusedBorder 和 enabledBorder - focusedBorder: const OutlineInputBorder( - borderSide: BorderSide.none, - borderRadius: BorderRadius.all(Radius.circular(8.0)), - ), - enabledBorder: const OutlineInputBorder( - borderSide: BorderSide.none, - borderRadius: BorderRadius.all(Radius.circular(8.0)), - ), - ), - onChanged: (value){ - controller.message.value = value; - print(value); - }, - ), - ), - bottomNavigationBar: Container( - margin: EdgeInsets.only(bottom: 30.w), - child: Container( - width: 350.w, - height: 45.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(45.w)), - gradient: LinearGradient( - begin: Alignment.centerLeft, // 90deg: 从左到右 - end: Alignment.centerRight, - colors: [ - Color.fromRGBO(131, 89, 255, 1), // 起点颜色 - Color.fromRGBO(77, 127, 231, 1), // 中间颜色 - Color.fromRGBO(61, 138, 224, 1), // 终点颜色 - ], - stops: [0.0, 0.7753, 1.0], // 对应 0%、77.53%、100% - ), - ), - child: Center( - child: Text( - "保存", - style: TextStyle( - fontSize: 18.w, - color: Colors.white, - fontWeight: FontWeight.w500 + body: Column( + children: [ + TDTextarea( + controller: controller.messageController.value, + hintText: '请输入交友心声', + maxLines: 5, + minLines: 5, + maxLength: 80, + indicator: true, + layout: TDTextareaLayout.vertical, + bordered: true, + onChanged: (value) { + controller.message.value = value; + }, ), - ), - ), - ).onTap(() async { - controller.savaDescribeInfo(); - }), - ), + const SizedBox(height: 48), + TDButton( + text: '保存', + width: MediaQuery.of(context).size.width - 50, + size: TDButtonSize.large, + type: TDButtonType.fill, + shape: TDButtonShape.round, + style: TDButtonStyle( + textColor: Colors.white, + backgroundColor: Color(0xFF7562F9), + ), + activeStyle: TDButtonStyle( + textColor: Colors.white, + backgroundColor: Color(0xC37562F9), + ), + onTap: (){ + controller.savaDescribeInfo(); + }, + ), + ], + ), ); }, ); From 543daa8c8f0960a531b6569da1a91a7c4b768796 Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Mon, 12 Jan 2026 16:44:45 +0800 Subject: [PATCH 14/24] no message --- .../mine/matchmaker_update_controller.dart | 31 -- lib/pages/mine/matchmaker_update_page.dart | 321 ------------------ 2 files changed, 352 deletions(-) delete mode 100644 lib/controller/mine/matchmaker_update_controller.dart delete mode 100644 lib/pages/mine/matchmaker_update_page.dart diff --git a/lib/controller/mine/matchmaker_update_controller.dart b/lib/controller/mine/matchmaker_update_controller.dart deleted file mode 100644 index 0e7eff1..0000000 --- a/lib/controller/mine/matchmaker_update_controller.dart +++ /dev/null @@ -1,31 +0,0 @@ -import 'package:get/get.dart'; - -class MatchmakerUpdateController extends GetxController { - final sum = 0.obs; - - final select = 0.obs; - - final deal = [ - {"title": "实习红娘", "price": "0", "revenue": [ - "礼物收益范围15%-30%,嘉宾消费的分成3%;", - "每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;", - "红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;", - "新徒弟首月收益的10%(平台奖励)", - ]}, - {"title": "在线红娘", "price": "99", "revenue": [ - "礼物收益范围30%-40%,嘉宾消费的分成6%;", - "每天前5人连麦的礼物收益30%,第6-10人连麦的礼物收益35%,第11人以上连麦的礼物收益40%;", - "红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;", - "新徒弟首月收益的10%(平台奖励)", - ]}, - {"title": "签约红娘", "price": "399", "revenue": [ - "礼物收益固定40%,邀请嘉宾,嘉宾消费的分成10%", - "红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;", - "新徒弟首月收益的10%(平台奖励)", - ]}, - ].obs; - - changeActive(int i){ - select.value = i; - } -} \ No newline at end of file diff --git a/lib/pages/mine/matchmaker_update_page.dart b/lib/pages/mine/matchmaker_update_page.dart deleted file mode 100644 index 514cb9a..0000000 --- a/lib/pages/mine/matchmaker_update_page.dart +++ /dev/null @@ -1,321 +0,0 @@ -import 'package:dating_touchme_app/components/page_appbar.dart'; -import 'package:dating_touchme_app/controller/mine/matchmaker_update_controller.dart'; -import 'package:dating_touchme_app/extension/ex_widget.dart'; -import 'package:dating_touchme_app/generated/assets.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter_screenutil/flutter_screenutil.dart'; -import 'package:get/get.dart'; - -class MatchmakerUpdatePage extends StatelessWidget { - const MatchmakerUpdatePage({super.key}); - - @override - Widget build(BuildContext context) { - return GetX( - init: MatchmakerUpdateController(), - builder: (controller){ - return Stack( - children: [ - Positioned( - child: Container( - width: 375.w, - height: 812.h, - decoration: BoxDecoration( - gradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - colors: [ - Color.fromRGBO(172, 89, 255, 1), // 100% - Color.fromRGBO(117, 98, 249, 1), // 64.87% - Color.fromRGBO(117, 98, 249, 1), // 43.03% - Color.fromRGBO(255, 255, 255, 1), // 0% - ], - stops: [ - 0.0, - 0.2303, - 0.4487, - 0.6, - ], - ), - ), - ), - ), - Scaffold( - backgroundColor: Colors.transparent, - appBar: PageAppbar(title: "升级红娘", backgroundColor: Colors.transparent, color: Colors.white,), - body: SingleChildScrollView( - child: Container( - padding: EdgeInsets.symmetric( - vertical: 20.w, - horizontal: 12.w - ), - child: Column( - children: [ - Container( - padding: EdgeInsets.symmetric( - vertical: 20.w, - horizontal: 12.w - ), - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.all(Radius.circular(18.w)), - ), - child: Column( - children: [ - Row( - children: [ - Text( - "趣恋恋,让婚恋服务更高效", - style: TextStyle( - fontSize: 16.w, - fontWeight: FontWeight.w500 - ), - ) - ], - ), - SizedBox(height: 15.w,), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - ...controller.deal.asMap().entries.map((entry){ - return SelectItem( - item: entry.value, - index: entry.key, - active: controller.select.value, - changeActive: controller.changeActive, - ); - }), - ], - ), - SizedBox(height: 30.w,), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "新红娘入驻权益", - style: TextStyle( - fontSize: 22.w, - color: const Color.fromRGBO(48, 48, 48, 1), - fontWeight: FontWeight.w500 - ), - ), - SizedBox(width: 10.w,), - Image.asset( - Assets.imagesLimitTime, - width: 30.w, - height: 16.w, - ) - ], - ), - SizedBox(height: 15.w,), - ...(controller.deal[controller.select.value]["revenue"] as List).asMap().entries.map((entry){ - return RevenueItem( - index: controller.select.value == 2 && entry.key >= 1 ? entry.key + 1 : entry.key, - title: entry.value, - ); - }) - ], - ), - ), - Container( - width: 325.w, - height: 45.w, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(45.w)), - gradient: LinearGradient( - begin: Alignment.centerLeft, // 0%:左边开始 - end: Alignment.centerRight, // 100%:右边结束 - colors: [ - Color.fromRGBO(131, 89, 255, 1), // 紫色 - Color.fromRGBO(77, 127, 231, 1), // 中间淡蓝 - Color.fromRGBO(61, 138, 224, 1), // 右侧深蓝 - ], - stops: [0.0, 0.7753, 1.0], // 对应 CSS 百分比:0%、77.53%、100% - ), - ), - child: Center( - child: Text( - "确认", - style: TextStyle( - fontSize: 18.w, - color: Colors.white, - fontWeight: FontWeight.w500 - ), - ), - ), - ) - ], - ), - ), - ), - ) - ], - ); - }, - ); - } -} - -class SelectItem extends StatefulWidget { - final Map item; - final int index; - final int active; - final Function(int) changeActive; - const SelectItem({super.key, required this.item, required this.index, required this.active, required this.changeActive}); - - @override - State createState() => _SelectItemState(); -} - -class _SelectItemState extends State { - @override - Widget build(BuildContext context) { - return Stack( - children: [ - Container( - width: 103.w, - height: 109.w, - padding: EdgeInsets.only( - top: 32.w, - bottom: 9.w - ), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(17.w)), - border: Border.all(width: 1, color: widget.active == widget.index ? const Color.fromRGBO(117, 98, 249, 1) : const Color.fromRGBO(222, 222, 222, 1)), - gradient: widget.active == widget.index ? LinearGradient( - begin: Alignment.centerLeft, // 90deg 从左到右 - end: Alignment.centerRight, - colors: [ - Color.fromRGBO(232, 199, 255, 0.2), // 0% - Color.fromRGBO(194, 195, 255, 0.2), // 100% - ], - stops: [ - 0.0, - 1.0, - ], - ) : null, - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Text( - "年费", - style: TextStyle( - fontSize: 11.w, - fontWeight: FontWeight.w700 - ), - ), - RichText( - text: TextSpan( - style: TextStyle( - color: const Color.fromRGBO(248, 85, 66, 1), - fontWeight: FontWeight.w700 - ), - children: [ - TextSpan( - text: "¥", - style: TextStyle( - fontSize: 11.w - ) - ), - TextSpan( - text: "${widget.item["price"]}", - style: TextStyle( - fontSize: 21.w - ) - ) - ] - ), - ), - Text( - "+10小时视频相亲", - style: TextStyle( - color: Color.fromRGBO(144, 144, 144, widget.index == 0 ? 1 : 0), - fontSize: 9.w - ), - ) - ], - ), - ), - Positioned( - top: 0, - left: 0, - child: Container( - width: 63.w, - height: 16.w, - decoration: BoxDecoration( - color: widget.active == widget.index ? const Color.fromRGBO(117, 98, 249, 1) : const Color.fromRGBO(191, 191, 191, 1), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(16.w), - bottomRight: Radius.circular(16.w), - ) - ), - child: Center( - child: Text( - "${widget.item["title"]}", - style: TextStyle( - fontSize: 9.w, - color: Colors.white, - fontWeight: FontWeight.w500 - ), - ), - ), - ), - ) - ], - ).onTap((){ - widget.changeActive(widget.index); - }); - } -} - -class RevenueItem extends StatefulWidget { - final int index; - final String title; - const RevenueItem({super.key, required this.index, required this.title}); - - @override - State createState() => _RevenueItemState(); -} - -class _RevenueItemState extends State { - - final matchmakerIcons = { - 0: Assets.imagesMatchmakerIcon1, - 1: Assets.imagesMatchmakerIcon2, - 2: Assets.imagesMatchmakerIcon3, - 3: Assets.imagesMatchmakerIcon4, - }; - - @override - Widget build(BuildContext context) { - return Container( - padding: EdgeInsets.all(17.w), - margin: EdgeInsets.only(bottom: 4.w), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(18.w)), - color: const Color.fromRGBO(117, 98, 249, .1) - ), - child: Row( - children: [ - Image.asset( - matchmakerIcons[widget.index]!, - width: 26.w, - height: 26.w, - ), - SizedBox(width: 14.w,), - Expanded( - child: Text( - widget.title, - style: TextStyle( - fontSize: 11.w, - fontWeight: FontWeight.w500 - ), - ), - ) - ], - ), - ); - } -} - From b6a864442a84be786ec91841d3af6266e81dbf08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 16:56:53 +0800 Subject: [PATCH 15/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=EF=BC=8C=E4=BC=98=E5=8C=96=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/withdraw_history_page.dart | 6 +++--- lib/pages/mine/withdraw_page.dart | 8 -------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/pages/mine/withdraw_history_page.dart b/lib/pages/mine/withdraw_history_page.dart index 0caa813..c2c4adb 100644 --- a/lib/pages/mine/withdraw_history_page.dart +++ b/lib/pages/mine/withdraw_history_page.dart @@ -147,8 +147,8 @@ class WithdrawHistoryPage extends StatelessWidget { ], ), SizedBox(height: 8.w,), - Text( - "${item.extDetailsInfo?.bankName}(${item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4)})", + if(item.extDetailsInfo?.bankName != null && item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4) != null) Text( + "${item.extDetailsInfo?.bankName ?? ""}(${item.extDetailsInfo?.cardNum!.substring(item.extDetailsInfo!.cardNum!.length - 4) ?? ""})", style: TextStyle( fontSize: 12.w, ), @@ -172,7 +172,7 @@ class WithdrawHistoryPage extends StatelessWidget { color: const Color.fromRGBO(153, 153, 153, 1) ), ), - Text( + if(item.remitUrl != "" && item.remitUrl != null)Text( "查看打款凭证", style: TextStyle( fontSize: 12.w, diff --git a/lib/pages/mine/withdraw_page.dart b/lib/pages/mine/withdraw_page.dart index f6265e9..c0a32e4 100644 --- a/lib/pages/mine/withdraw_page.dart +++ b/lib/pages/mine/withdraw_page.dart @@ -63,14 +63,6 @@ class WithdrawPage extends StatelessWidget { fontWeight: FontWeight.w500 ), ), - SizedBox(height: 6.w,), - Text( - "1个工作日内到账", - style: TextStyle( - fontSize: 12.w, - color: const Color.fromRGBO(153, 153, 153, 1) - ), - ) ], ), if(controller.nowBankCard.value.id == null) Text( From 26b316bc735f18bfe3f4f1390962105ea7b4699b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 17:00:18 +0800 Subject: [PATCH 16/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/withdraw_history_page.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/pages/mine/withdraw_history_page.dart b/lib/pages/mine/withdraw_history_page.dart index c2c4adb..b8a730b 100644 --- a/lib/pages/mine/withdraw_history_page.dart +++ b/lib/pages/mine/withdraw_history_page.dart @@ -137,7 +137,11 @@ class WithdrawHistoryPage extends StatelessWidget { color: (item.remitStatus ?? false) ? const Color.fromRGBO(25, 114, 248, 1) : const Color.fromRGBO(238, 129, 27, 1) ), child: Text( - (item.remitStatus ?? false) ? "提现成功" :"处理中", + item.status == 1 ? "待审核" : + item.status == 2 && item.remitStatus == true ? "提现成功" : + item.status == 2 && item.remitStatus == false ? "待打款" : + item.status == 3 ? "审核失败" : + "", style: TextStyle( fontSize: 10.w, color: Colors.white From 3a2f1331eac59a10c77238157e24cdf3ee1d1eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Mon, 12 Jan 2026 17:00:35 +0800 Subject: [PATCH 17/24] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=8E=B0?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/mine/withdraw_history_page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pages/mine/withdraw_history_page.dart b/lib/pages/mine/withdraw_history_page.dart index b8a730b..52bb54b 100644 --- a/lib/pages/mine/withdraw_history_page.dart +++ b/lib/pages/mine/withdraw_history_page.dart @@ -139,7 +139,7 @@ class WithdrawHistoryPage extends StatelessWidget { child: Text( item.status == 1 ? "待审核" : item.status == 2 && item.remitStatus == true ? "提现成功" : - item.status == 2 && item.remitStatus == false ? "待打款" : + item.status == 2 && (item.remitStatus ?? false) == false ? "待打款" : item.status == 3 ? "审核失败" : "", style: TextStyle( From 3643d37fbe31cc7f6e9abcaeb786dbe38494ac9f Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Mon, 12 Jan 2026 21:33:24 +0800 Subject: [PATCH 18/24] =?UTF-8?q?fix(rtc):=20=E8=A7=A3=E5=86=B3RTC?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86=E5=92=8C?= =?UTF-8?q?=E9=A2=91=E9=81=93=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在CallController中修复忙线提示时重置创建频道状态 - 调整聊天输入框底部内边距样式 - 在网络配置中添加API URL导入并实现SW RTC Token回调刷新逻辑 - 在房间控制器中添加连麦成功后的数据刷新机制 - 增强RTC管理器中服务器封禁连接状态的处理逻辑 - 添加非主播角色被封禁时自动离开频道和结束直播消息处理 --- lib/controller/discover/room_controller.dart | 8 ++++++++ lib/controller/message/call_controller.dart | 1 + lib/network/network_config.dart | 10 +++++++++- lib/rtc/rtc_manager.dart | 18 ++++++++++++++++-- lib/widget/message/chat_input_bar.dart | 3 +++ 5 files changed, 37 insertions(+), 3 deletions(-) diff --git a/lib/controller/discover/room_controller.dart b/lib/controller/discover/room_controller.dart index 6fe806c..0468175 100644 --- a/lib/controller/discover/room_controller.dart +++ b/lib/controller/discover/room_controller.dart @@ -23,6 +23,7 @@ import '../../pages/mine/real_name_page.dart'; import '../../pages/setting/match_spread_page.dart'; import '../../widget/live/live_recharge_popup.dart'; import '../message/call_controller.dart'; +import 'discover_controller.dart'; import 'svga_player_manager.dart'; // 当前角色 @@ -262,6 +263,11 @@ class RoomController extends GetxController with WidgetsBindingObserver { }; final response = await _networkService.rtcApi.connectRtcChannel(data); if (!response.data.isSuccess) { + // 刷新 DiscoverController.loadRtcChannelPage + if (Get.isRegistered()) { + final discoverController = Get.find(); + discoverController.loadRtcChannelPage(); + } SmartDialog.showToast(response.data.message); return; } @@ -276,6 +282,8 @@ class RoomController extends GetxController with WidgetsBindingObserver { } else { await RTCManager.instance.publishAudio(); } + // 上麦成功后刷新连麦卡片数据 + await getUserPropLinkMicCard(); RtcSeatUserInfo userInfo = RtcSeatUserInfo( uid: rtcChannel.value?.uid, miId: GlobalData().userData?.id ?? '', diff --git a/lib/controller/message/call_controller.dart b/lib/controller/message/call_controller.dart index bc94f03..c2c88b2 100644 --- a/lib/controller/message/call_controller.dart +++ b/lib/controller/message/call_controller.dart @@ -186,6 +186,7 @@ class CallController extends GetxController { } if (!response.data.data!.success && response.data.data!.code == 'E0003') { SmartDialog.showToast('对方忙线中'); + isCreatingChannel.value = false; return null; } rtcChannel.value = response.data.data; diff --git a/lib/network/network_config.dart b/lib/network/network_config.dart index 9cc2447..8d0be35 100644 --- a/lib/network/network_config.dart +++ b/lib/network/network_config.dart @@ -1,8 +1,10 @@ import 'package:dating_touchme_app/controller/global.dart'; import 'package:dating_touchme_app/controller/message/conversation_controller.dart'; +import 'package:dating_touchme_app/controller/discover/discover_controller.dart'; import 'package:dating_touchme_app/controller/discover/room_controller.dart'; import 'package:dating_touchme_app/controller/overlay_controller.dart'; import 'package:dating_touchme_app/im/im_manager.dart'; +import 'package:dating_touchme_app/network/api_urls.dart'; import 'package:dio/dio.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:get/get.dart' hide Response; @@ -100,6 +102,13 @@ class ResponseInterceptor extends Interceptor { _showError("登录已过期,请重新登录"); _handleTokenExpired(); } else { + if(response.realUri.path.contains(ApiUrls.getSwRtcToken)){ + // 调用 DiscoverController.loadRtcChannelPage 刷新频道列表 + if (Get.isRegistered()) { + final discoverController = Get.find(); + discoverController.loadRtcChannelPage(); + } + } // 业务错误 final message = data['message'] ?? '请求失败'; _showError(message); @@ -151,7 +160,6 @@ class ResponseInterceptor extends Interceptor { default: errorMessage = err.message ?? '未知错误'; } - _showError(errorMessage); handler.reject(err); } diff --git a/lib/rtc/rtc_manager.dart b/lib/rtc/rtc_manager.dart index 0e51098..d65474e 100644 --- a/lib/rtc/rtc_manager.dart +++ b/lib/rtc/rtc_manager.dart @@ -238,8 +238,22 @@ class RTCManager { RtcConnection connection, ConnectionStateType state, ConnectionChangedReasonType reason, - ) { - print('连接状态改变:$state,原因:$reason'); + ) async{ + if(state == ConnectionStateType.connectionStateFailed && + reason == ConnectionChangedReasonType.connectionChangedBannedByServer){ + if (Get.isRegistered()) { + final roomController = Get.find(); + // 判断不是主播(从 RoomController.currentRole 获取角色) + final isNotBroadcaster = roomController.currentRole != CurrentRole.broadcaster; + if (isNotBroadcaster) { + await roomController.leaveChannel(); + // 调用 LiveChatMessageService 处理结束直播消息 + LiveChatMessageService.instance.handleEndLiveMessage(); + } + } + return; + } + print('连接状态改变:$state,原因:$reason, localUid: ${connection.localUid}'); if (onConnectionStateChanged != null) { onConnectionStateChanged!(connection, state, reason); } diff --git a/lib/widget/message/chat_input_bar.dart b/lib/widget/message/chat_input_bar.dart index 1bc1875..f761f96 100644 --- a/lib/widget/message/chat_input_bar.dart +++ b/lib/widget/message/chat_input_bar.dart @@ -174,6 +174,9 @@ class _ChatInputBarState extends State { fontSize: 14.sp, color: Colors.grey, ), + contentPadding: EdgeInsets.only( + bottom: 10 + ), ), inputFormatters: [ // 可以添加其他格式化器,但不要添加过滤Unicode的规则 From d1cb2be6cf704cc8c1992f9256afed557b8aaf4b Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Tue, 13 Jan 2026 14:47:19 +0800 Subject: [PATCH 19/24] =?UTF-8?q?refactor(chat):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 GestureDetector 移至 Column 外层以实现点击空白处收起键盘功能 - 调整消息列表区域的容器嵌套结构 - 重新组织组件层级以提升布局逻辑清晰度 --- lib/pages/message/chat_page.dart | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/pages/message/chat_page.dart b/lib/pages/message/chat_page.dart index c3e886b..d653424 100644 --- a/lib/pages/message/chat_page.dart +++ b/lib/pages/message/chat_page.dart @@ -305,18 +305,18 @@ class _ChatPageState extends State { }, ), ), - body: Column( - children: [ - // 消息列表区域 - Expanded( - child: Container( - color: Color(0xffF5F5F5), - child: GestureDetector( - onTap: () { - // 点击消息区域收起键盘 - FocusManager.instance.primaryFocus?.unfocus(); - }, - behavior: HitTestBehavior.opaque, + body: GestureDetector( + onTap: () { + // 点击空白处收起键盘 + FocusManager.instance.primaryFocus?.unfocus(); + }, + behavior: HitTestBehavior.opaque, + child: Column( + children: [ + // 消息列表区域 + Expanded( + child: Container( + color: Color(0xffF5F5F5), child: ListView.builder( controller: _scrollController, reverse: false, @@ -375,7 +375,6 @@ class _ChatPageState extends State { ), ), ), - ), // 使用抽离的聊天输入栏组件 ChatInputBar( onSendMessage: (message) async { @@ -404,6 +403,7 @@ class _ChatPageState extends State { }, ), ], + ), ), ), ); From 27f57ebb1c611d9b92b3872114a006ad459ce36e Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Tue, 13 Jan 2026 14:56:57 +0800 Subject: [PATCH 20/24] =?UTF-8?q?feat(chat):=20=E6=B7=BB=E5=8A=A0=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E8=BE=93=E5=85=A5=E6=A0=8F=E9=9D=A2=E6=9D=BF=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 ChatInputBar 中添加静态方法 closePanels 用于关闭面板 - 实现 closeAllPanels 方法供外部调用关闭所有面板 - 在 ChatPage 中添加 GlobalKey 用于引用 ChatInputBar - 点击空白区域时调用 ChatInputBar.closePanels 关闭底部面板 - 为 ChatInputBar 组件添加 key 属性以支持实例访问 --- lib/pages/message/chat_page.dart | 6 ++++++ lib/widget/message/chat_input_bar.dart | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib/pages/message/chat_page.dart b/lib/pages/message/chat_page.dart index d653424..39d2eeb 100644 --- a/lib/pages/message/chat_page.dart +++ b/lib/pages/message/chat_page.dart @@ -62,6 +62,9 @@ class _ChatPageState extends State { // 礼物弹窗相关 final activeGift = ValueNotifier(null); final giftNum = ValueNotifier(1); + + // ChatInputBar 的 GlobalKey,用于关闭底部面板 + final GlobalKey> _chatInputBarKey = GlobalKey>(); @override void initState() { @@ -309,6 +312,8 @@ class _ChatPageState extends State { onTap: () { // 点击空白处收起键盘 FocusManager.instance.primaryFocus?.unfocus(); + // 关闭底部面板(表情、更多选项、语音输入) + ChatInputBar.closePanels(_chatInputBarKey); }, behavior: HitTestBehavior.opaque, child: Column( @@ -377,6 +382,7 @@ class _ChatPageState extends State { ), // 使用抽离的聊天输入栏组件 ChatInputBar( + key: _chatInputBarKey, onSendMessage: (message) async { await controller.sendMessage(message); }, diff --git a/lib/widget/message/chat_input_bar.dart b/lib/widget/message/chat_input_bar.dart index f761f96..f026941 100644 --- a/lib/widget/message/chat_input_bar.dart +++ b/lib/widget/message/chat_input_bar.dart @@ -31,6 +31,14 @@ class ChatInputBar extends StatefulWidget { @override State createState() => _ChatInputBarState(); + + // 静态方法:通过 key 关闭面板 + static void closePanels(GlobalKey? key) { + final state = key?.currentState; + if (state != null && state is _ChatInputBarState) { + state.closeAllPanels(); + } + } } class _ChatInputBarState extends State { @@ -109,6 +117,11 @@ class _ChatInputBarState extends State { } } + // 公开方法:从外部关闭所有面板 + void closeAllPanels() { + _closeAllPanels(); + } + @override void initState() { super.initState(); From f168658e8e7b16cf8bed7f1f31ea1b8e88152fdf Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Tue, 13 Jan 2026 15:13:52 +0800 Subject: [PATCH 21/24] =?UTF-8?q?feat(video=5Fcall):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E9=80=9A=E8=AF=9D=E7=B1=BB=E5=9E=8B=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=B9=B6=E4=BC=98=E5=8C=96=E9=82=80=E8=AF=B7=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除不必要的 RTM 订阅操作 - 为 VideoCallInviteDialog 组件添加 callType 参数 - 在 RoseController 中添加 RoomController 余额刷新逻辑 - 为视频通话邀请弹窗添加日志记录功能 --- lib/controller/mine/rose_controller.dart | 11 +++++++++++ lib/im/im_manager.dart | 2 +- lib/widget/message/video_call_invite_dialog.dart | 2 ++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/controller/mine/rose_controller.dart b/lib/controller/mine/rose_controller.dart index 12d21dc..984bc99 100644 --- a/lib/controller/mine/rose_controller.dart +++ b/lib/controller/mine/rose_controller.dart @@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_smart_dialog/flutter_smart_dialog.dart'; import 'package:fluwx/fluwx.dart'; import 'package:get/get.dart'; +import '../discover/room_controller.dart'; class RoseController extends GetxController with WidgetsBindingObserver { @@ -96,6 +97,16 @@ class RoseController extends GetxController with WidgetsBindingObserver { launchWX.value = false; count.value = 0; getRoseNum(); + // 刷新 RoomController 的余额 + if (Get.isRegistered()) { + try { + final roomController = Get.find(); + await roomController.getVirtualAccount(); + print('✅ 已刷新 RoomController 的玫瑰余额'); + } catch (e) { + print('⚠️ 刷新 RoomController 余额失败: $e'); + } + } } else { count.value += 1; if(count.value < 3){ diff --git a/lib/im/im_manager.dart b/lib/im/im_manager.dart index ddac92d..5d9e24f 100644 --- a/lib/im/im_manager.dart +++ b/lib/im/im_manager.dart @@ -1902,7 +1902,6 @@ class IMManager { return; } - RTMManager.instance.subscribe(channelId ?? ''); // 获取用户信息 Map? attributes; try { @@ -1953,6 +1952,7 @@ class IMManager { tag: 'video_call_invite_dialog', builder: (context) { return VideoCallInviteDialog( + callType: callType, avatarUrl: finalAvatarUrl, nickName: finalNickName, onTap: () async { diff --git a/lib/widget/message/video_call_invite_dialog.dart b/lib/widget/message/video_call_invite_dialog.dart index f51c8f3..6e61459 100644 --- a/lib/widget/message/video_call_invite_dialog.dart +++ b/lib/widget/message/video_call_invite_dialog.dart @@ -2,6 +2,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:dating_touchme_app/generated/assets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:get/get.dart'; /// 视频通话邀请弹框 class VideoCallInviteDialog extends StatelessWidget { @@ -26,6 +27,7 @@ class VideoCallInviteDialog extends StatelessWidget { @override Widget build(BuildContext context) { + Get.log('VideoCallInviteDialog$callType'); return GestureDetector( onTap: onTap, child: Container( From a1ddf8ca2d53f1741a35ba00f65a274c22029c0a Mon Sep 17 00:00:00 2001 From: ZHR007 Date: Tue, 13 Jan 2026 15:44:56 +0800 Subject: [PATCH 22/24] no message --- lib/controller/message/call_controller.dart | 6 ++++++ lib/controller/setting/spread_controller.dart | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/controller/message/call_controller.dart b/lib/controller/message/call_controller.dart index c2c88b2..9fc8f32 100644 --- a/lib/controller/message/call_controller.dart +++ b/lib/controller/message/call_controller.dart @@ -57,6 +57,12 @@ class CallSession { final end = endTime ?? DateTime.now(); return end.difference(startTime).inSeconds; } + + @override + String toString() { + return '{callType: $callType, status: $status, isInitiator: $isInitiator}'; + } + } /// 通话相关控制器 diff --git a/lib/controller/setting/spread_controller.dart b/lib/controller/setting/spread_controller.dart index a915015..a02b00c 100644 --- a/lib/controller/setting/spread_controller.dart +++ b/lib/controller/setting/spread_controller.dart @@ -65,15 +65,15 @@ class SpreadController extends GetxController with WidgetsBindingObserver { ]; } else if(roseList[activePay.value].subCategory == 88802){ revenue.value = [ - {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, - {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, + {'icon': '1', 'desc': '礼物收益范围40%,嘉宾消费的分成10%;'}, + // {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, {'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'}, {'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'}, ]; } else if(roseList[activePay.value].subCategory == 88801){ revenue.value = [ - {'icon': '1', 'desc': '礼物收益范围15%-30%,嘉宾消费的分成3%;'}, - {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, + {'icon': '1', 'desc': '礼物收益范围40%,嘉宾消费的分成10%;'}, + // {'icon': '2', 'desc': '每天前5人连麦的礼物收益15%,第6-10人连麦的礼物收益20%,第11-15人连麦的礼物收益25%,第16人以上连麦的礼物收益30%;'}, {'icon': '3', 'desc': '红娘推荐的嘉宾成为红娘,赚取入驻费的20%分成;'}, {'icon': '4', 'desc': '新徒弟首月收益的10%(平台奖励)'}, ]; From 20fd31efed1541c1cf78a77527b22381eb7927ad Mon Sep 17 00:00:00 2001 From: Jolie <412895109@qq.com> Date: Tue, 13 Jan 2026 16:34:44 +0800 Subject: [PATCH 23/24] =?UTF-8?q?feat(discover):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E7=BB=84=E4=BB=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B9=B4=E9=BE=84=E4=BF=A1=E6=81=AF=E5=B9=B6=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E4=B8=8D=E8=B6=B3=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在RtcChannelModel模型中添加age字段用于存储年龄信息 - 修改live_item_widget.dart中的UI逻辑,将频道名称和年龄信息合并显示 - 移除直播间控制器中的积分不足toast提示信息 - 优化直播间成员信息展示格式,支持年龄信息动态显示 --- lib/controller/discover/room_controller.dart | 1 - lib/model/discover/rtc_channel_model.dart | 3 +++ lib/pages/discover/live_item_widget.dart | 18 +----------------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/lib/controller/discover/room_controller.dart b/lib/controller/discover/room_controller.dart index 0468175..717db64 100644 --- a/lib/controller/discover/room_controller.dart +++ b/lib/controller/discover/room_controller.dart @@ -272,7 +272,6 @@ class RoomController extends GetxController with WidgetsBindingObserver { return; } if (!response.data.data['success']) { - SmartDialog.showToast('积分不足'); return; } currentRole = role; diff --git a/lib/model/discover/rtc_channel_model.dart b/lib/model/discover/rtc_channel_model.dart index d90e79f..575e3d6 100644 --- a/lib/model/discover/rtc_channel_model.dart +++ b/lib/model/discover/rtc_channel_model.dart @@ -3,11 +3,13 @@ class RtcChannelModel { final String channelId; final String channelPic; final String channelName; + final int age; RtcChannelModel({ required this.channelId, required this.channelPic, required this.channelName, + required this.age, }); factory RtcChannelModel.fromJson(Map json) { @@ -15,6 +17,7 @@ class RtcChannelModel { channelId: json['channelId']?.toString() ?? '', channelPic: json['channelPic']?.toString() ?? '', channelName: json['channelName']?.toString() ?? '', + age: json['age'] ?? 0, ); } diff --git a/lib/pages/discover/live_item_widget.dart b/lib/pages/discover/live_item_widget.dart index 0038634..738f53f 100644 --- a/lib/pages/discover/live_item_widget.dart +++ b/lib/pages/discover/live_item_widget.dart @@ -187,27 +187,11 @@ class _LiveItemWidgetState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox( - width: 64.w, - child: Text( - widget.channel != null && widget.channel!.channelName.isNotEmpty - ? widget.channel!.channelName - : "一直一直在等你一直一直在等你......", - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: TextStyle( - fontSize: 8.w, - color: Colors.white, - fontWeight: FontWeight.w500, - ), - ), - ), - SizedBox(height: 2.w), Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ Text( - "福州 | 28岁", + widget.channel?.age != 0 && widget.channel?.age != null ? "${widget.channel?.channelName} | ${widget.channel?.age}岁" : widget.channel?.channelName ?? '', style: TextStyle( fontSize: 11.w, color: Colors.white, From 166cbf5b19c417feaab14b7f0e211b5382070772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E8=B4=A4?= Date: Tue, 13 Jan 2026 17:09:45 +0800 Subject: [PATCH 24/24] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=B1=95=E7=A4=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/controller/home/user_information_controller.dart | 2 +- lib/pages/home/user_information_page.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/controller/home/user_information_controller.dart b/lib/controller/home/user_information_controller.dart index 72a00fa..7b53de6 100644 --- a/lib/controller/home/user_information_controller.dart +++ b/lib/controller/home/user_information_controller.dart @@ -31,7 +31,7 @@ class UserInformationController extends GetxController { @override void onInit() { super.onInit(); - + myUserData.value = GlobalData().userData; // 验证参数 if (miId.isEmpty) { errorMessage.value = '用户ID无效'; diff --git a/lib/pages/home/user_information_page.dart b/lib/pages/home/user_information_page.dart index ad0da54..0650625 100644 --- a/lib/pages/home/user_information_page.dart +++ b/lib/pages/home/user_information_page.dart @@ -179,7 +179,7 @@ class UserInformationPage extends StatelessWidget { ), ), SizedBox(width: 13.w,), - if(controller.myUserData.value?.genderCode == 0) Container( + if(controller.userData.value?.genderCode == 1) Container( width: 33.w, height: 13.w, decoration: BoxDecoration( @@ -257,7 +257,7 @@ class UserInformationPage extends StatelessWidget { ), ), SizedBox(width: 4.w,), - if(controller.myUserData.value?.genderCode == 1) Container( + if(controller.userData.value?.genderCode == 0) Container( width: 33.w, height: 13.w, decoration: BoxDecoration(