Git Product home page Git Product logo

Comments (3)

zmtzawqlp avatar zmtzawqlp commented on August 22, 2024

环境

我运行了大佬的demo项目,进入了NestedScrollView页面,进入SecondTabView文件 ,然后在下图25行处print字符串
image
image

现象

滑动TabBarView里的列表时 整个页面会重新build,控制台输出结果如下
image

期望

我自己的项目里 TabBarView内有很多图片 这会导致每次滑动图片都会重绘 体验不是很好,不知大佬是否有方法优化

`
:~ blurfir$ flutter doctor -v
[✓] Flutter (Channel stable, v1.12.13+hotfix.8, on Mac OS X 10.14.5 18F132,
locale zh-Hans-CN)
• Flutter version 1.12.13+hotfix.8 at /Users/blurfir/flutter
• Framework revision 0b8abb4724 (3 months ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/blurfir/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/blurfir/Library/Android/sdk
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 42.1.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.44.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.1

[✓] Connected device (1 available)
• iPhone 8 • D026A059-3954-4013-87EC-43659B1C69B9 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
`

不管在哪里,滚动,图片都会重绘,跟build不build没有关系。

列表图片 1.减少图片大小 2.使用缓存

from extended_nested_scroll_view.

z759341385 avatar z759341385 commented on August 22, 2024

@zmtzawqlp 好的我再试试 但是我在flutter的NestedScrollView里 Print就不会一直输出诶

from extended_nested_scroll_view.

z759341385 avatar z759341385 commented on August 22, 2024

减少图片大小 .使用缓存之后图片不会重新加载了

from extended_nested_scroll_view.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.