Skip to content

当gpt返回的消息内容很长时,ChatScrollObserverHandleMode.generative 不能保持手势主动滚动的位置 #142

@codon19

Description

@codon19

Version

1.26.2

Platforms

Android, iOS

Device Model

iPhone 12(iOS 18.5)

flutter info

[✓] Flutter (Channel stable, 3.35.7, on macOS 26.2 25C56 darwin-arm64, locale zh-Hans-CN) [1,076ms]
    • Flutter version 3.35.7 on channel stable at /Users/fvm/versions/3.35.7
    • Upstream repository https://gitee.com/mirrors/Flutter.git
    • FLUTTER_GIT_URL = https://gitee.com/mirrors/Flutter.git
    • Framework revision adc9010625 (3 months ago), 2025-10-21 14:16:03 -0400
    • Engine revision 035316565a
    • Dart version 3.9.2
    • DevTools version 2.48.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android,
      enable-ios, cli-animations, enable-lldb-debugging

[!] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [4.5s]
    • Android SDK at /Users/Library/Android/sdk
    • Emulator version 35.6.11.0 (build_id 13610412) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • ANDROID_HOME = /Users/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 26.2) [2.2s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17C52
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [5ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2025.1) [4ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.6+-13391695-b895.109)

[✓] Connected device (4 available) [6.0s]

[✓] Network resources [839ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.

How to reproduce?

在使用ChatScrollObserverHandleMode.generative时,列表反转渲染reverse: true, 当回复的流式内容很长时,从上往下滚动不会保持手势主动滚动的位置,cacheExtent设置很大才行,请问这个可以解决?

chatObserver.standby(
    mode: ChatScrollObserverHandleMode.generative,
    refItemIndex: 0,
    refItemIndexAfterUpdate: 0,
  );

Logs

Example code (optional)

Contact

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions