Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not panning correctly to flutter stream #29

Open
mmj-the-fighter opened this issue Nov 1, 2024 · 0 comments
Open

Not panning correctly to flutter stream #29

mmj-the-fighter opened this issue Nov 1, 2024 · 0 comments

Comments

@mmj-the-fighter
Copy link

Version

0.3.5

Platforms

Web

Device Model

Chrome Windows 11

flutter info

[√] Flutter (Channel stable, 3.16.5, on Microsoft Windows [Version 10.0.22631.4317], locale en-IN)
    • Flutter version 3.16.5 on channel stable at D:\FlutterSDK\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 78666c8dc5 (11 months ago), 2023-12-19 16:14:14 -0800
    • Engine revision 3f3e560236
    • Dart version 3.2.3
    • DevTools version 2.28.4

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at D:\AndroidSDK
    • Platform android-34, build-tools 34.0.0
    • Java binary at: D:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.11.35327.3
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.1)
    • Android Studio at D:\Program Files\Android\Android Studio
    • 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 17.0.7+0-b2043.56-10550314)

[√] VS Code (version 1.94.2)
    • VS Code at C:\Users\Manoj\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.4317]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 130.0.6723.92
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 130.0.2849.56

[√] Network resources
    • All expected network resources are available.

• No issues found!

How to reproduce?

Display interactive_chart initally with three candles in side a stream builder. Add a new candle every 5 second using a function. The graph is not panned correctly to the latest candle. We have to manually pan it using a gesture.

Logs

No errors

Example code (optional)

late StreamController<CandleData> _streamController;
 void _startGeneratingCandles() {
    Timer.periodic(Duration(seconds: 1), (timer) {
      if (currentIndex >= _data.length) {
        _streamController.close();
        timer.cancel();
      } else {
        if(currentIndex >= 0 && currentIndex < _data.length){
          CandleData candleData = _data[currentIndex];
          ++currentIndex;
          _streamController.add(candleData);
        }
      }
    });
  }

Contact

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant