When using nested Scrollview to collapse a writing project, we encounter a problem. The content in flexible spacebar needs to be displayed dynamically. Some data needs to be returned, which may be hidden. As a result, the height is uncertain. However, expandedheight in slicerappbar can only be fixed, so we have to find another way to obtain the height.
- copy a copy of the code in flexible space bar and write it into a statelesswidget to set a globalkey. Now you need to process the request, write it in the successful callback, and use the first frame of the successful request to get the height
WidgetsBinding.instance.addPostFrameCallback((_) {
RenderBox _cardBox =
_flexibleSpaceBarKey.currentContext.findRenderObject();
Future.delayed(Duration(milliseconds: 10), () {
setState(() {
heightFlexibleSpaceBar = _cardBox.size.height;
});
});
});
Read More:
- After IOS upgrade, the time control selected by the wheel will be invalid, uidatepicker
- Error: connect econnreused 0.0.0.0:443 is reported when executing the trunk unbox react
- Android get screen width and height and get control width and height
- Elasticsearch cluster cannot be started. The following prompt fails to send join request to master appears
- Vs2015 OpenGL environment configuration
- Simple configuration of glfw + glad in vs2015 OpenGL development environment
- Reading and saving opencv Python video
- Error:kCFStreamErrorCodeKey=-2102 Domain=kCFErrorDomainCFNetwork Code=-1001 – iOS
- Vs configuration of OpenGL development environment: configuration of glfw library and glad Library
- Configuration of OpenGL development environment under Windows environment, win10 + vs2019 + glfw + glad
- Invalidation of margin top property of nested box in CSS style box
- egg.js The frame post request reported an error of invalid CSRF token security verification, which has been solved
- Several ways to center elements horizontally and vertically
- Pychar console error: xmlrpc.client.Fault : Fault 0: ‘ java.lang.NullPointerException
- From in Python__ future__ The role of import *
- Solve the audio control and report domexception: the play() request was interrupted by a call to pause in the chrome console
- An error occurred while processing your request
- Configuring glfw library and glad Library in opengl-vs2015
- WeChat official account web page authorized, redirect_ Uri parameter error, solution!
- Beginners of OpenGL (1): preparation