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:
- JavaScript / JS native dynamic introduction of external CSS files and dynamic insertion of CSS code fragments
- node.js Static resource acquisition failed
- PC login Citrix WI times CPS License Acquisition Error (500) screenshot and solution
- Error reporting under layui dynamic select IE
- error: expected unqualified-id before ‘dynamic_cast’
- A method of collecting JS dynamic content by PHP
- error while loading shared libraries: requires glibc 2.5 or later dynamic linker
- Free dynamic screen capture drawing tool under MAC: KAP
- ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)
- Windows10解决ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed
- Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using’”‘ in pip installation
- Analysis of [error code [942], ora-00942 in synchronization of DDL statements in ogg
- Error reported in Python: syntax error: invalid character in identifier
- Mex compiler error handling in MATLAB and GCC installation in Ubuntu
- When installing software in Ubuntu, it prompts: E: You don’t have enough free space in /var/cache/apt/archives/.
- The introduction of third-party jar package in mavn project results in classnotfoundexception
- Error in installing centos8.3: DFN error: error in postrans scriptlet in RPM package kernel core
- Error in running script in openwrt
- A series of problems in configuring OpenGL development environment in vs2015