Closed YowFung closed 3 years ago
Hi,
Never got that ! I'll try to take a look asap!
For the performance are you talking in debug or release mode ? Because yes performances are shity (app wide) in debug mode, but I don't have any trouble in release mode.
@jaumard Yep, sorry. I have tried using it in my other simple application. It runs fast. So I think maybe my previous project that was too long, and the performance was affected.
No problem at :) I'm using it in a gridView on my app, only tried with 2/3 streams but with other items on the grid with no issues so far ^^
@jaumard, You can try the following suggestions to reproduce the issue:
Make the Mjpeg widget visible, and then invisible, and then visible again, the issue will take place.
Should be fixed on 1.3.0
I using this Mjpeg widget but it throws the following exception continuously...
or
In addition, when I include this Mjpeg widget in ListView (at least 5 items), my application runs very very slowly. Is it because of the poor performance of this widget?
My code snippet:
```dart import 'package:flutter/material.dart'; import 'package:flutter_mjpeg/flutter_mjpeg.dart'; class MyHomePage extends StatelessWidget { Widget build(BuildContext context) { var urlList = List.generate(255, (index) => "http://192.168.1.$index/stream"); return Scaffold( appBar: AppBar(title: Text("MJPEG")), body: Center( child: Container( width: double.infinity, height: 120, color: Colors.black12, child: ListView.builder( scrollDirection: Axis.horizontal, itemCount: urlList.length, itemBuilder: (BuildContext context, int index) => Container( margin: EdgeInsets.only(right: 10), width: 214, height: 120, color: Colors.black, child: Mjpeg( stream: urlList[index], isLive: true, fit: BoxFit.fill, error: (_, error) => Center(child: Text(error.toString(), style: TextStyle(color: Colors.red))), loading: (_) => Center(child: CircularProgressIndicator()) ) ) ) ) ) ); } } ```flutter doctor -v
```txt [√] Flutter (Channel master, 1.22.0-10.0.pre.39, on Microsoft Windows [Version 10.0.18362.1016], locale zh-CN) • Flutter version 1.22.0-10.0.pre.39 at D:\SDK\Flutter\stable • Framework revision a8281e31af (3 days ago), 2020-09-01 10:57:59 -0700 • Engine revision 165abef0a2 • Dart version 2.10.0 (build 2.10.0-77.0.dev) • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn [√] Android toolchain - develop for Android devices (Android SDK version 30.0.0) • Android SDK at D:/SDK/Android • Platform android-30, build-tools 30.0.0 • ANDROID_HOME = D:\SDK\Android • ANDROID_SDK_ROOT = D:\SDK\Android • Java binary at: C:\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.6.3) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.6.30225.117 • Windows 10 SDK version 10.0.18362.0 [√] Android Studio (version 4.0) • Android Studio at C:\Android\Android Studio • Flutter plugin version 46.0.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] VS Code (version 1.48.2) • VS Code at C:\Users\YowFu\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.14.0 [√] Connected device (2 available) • AGS2 AL00 (mobile) • 62RBB19920101383 • android-arm64 • Android 9 (API 28) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.18362.1016] • No issues found! ```