Flutter iOS端Svg图标与AppBar标题偶发不渲染问题求助
Flutter iOS端偶发AppBar标题与SVG图标不渲染问题
问题详情
- 仅iOS端会偶发出现AppBar内标题文字和SVG图标不渲染的情况,Android端无任何异常
- 多个页面均存在该问题(各页面AppBar的实现代码不同)
- 运行时控制台无报错信息,此问题已持续数月
示例页面AppBar代码
appBar: AppBar( toolbarHeight: 60, backgroundColor: Colors.white, surfaceTintColor: Colors.white, automaticallyImplyLeading: false, centerTitle: false, titleSpacing: 12, leadingWidth: 40, // or slightly more depending on your icon size leading: Padding( padding: EdgeInsets.only(left: 16), child: InkWell( highlightColor: Colors.transparent, onTap: () { context.pop(); }, child: Transform.rotate( angle: 180 * (3.1415926535 / 180), child: SvgPicture.asset( 'assets/images/chevron-right.svg', colorFilter: ColorFilter.mode(Helper.iconColor, BlendMode.srcIn), fit: BoxFit.contain, ), ), ), ), // leadingWidth: 24, title: Padding( padding: EdgeInsets.only(left: 0.w), child: Text( widget.projectName, style: TextStyle( letterSpacing: -0.3, color: Helper.baseBlack, fontSize: 18, fontWeight: FontWeight.w500), ), ), actions: [ if (MediaQuery.of(context).size.width < 500) Padding( padding: EdgeInsets.only(right: 16.w), child: InkWell( highlightColor: Colors.transparent, child: list ? SvgPicture.asset('assets/images/grid_view.svg') : SvgPicture.asset('assets/images/list_view.svg'), onTap: () { setState(() => list = !list); }, ), ), ], ),
问题截图

内容的提问来源于stack exchange,提问作者Hadi Khan
相关产品推荐
相关产品推荐

