You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter SDK升级后出现编译错误求助(已尝试清理及更新依赖)

Flutter SDK升级后出现编译错误求助(已尝试清理及更新依赖)

大家好,我最近升级Flutter SDK后碰到了两个棘手的编译错误,已经试过清理项目缓存、更新依赖包这些常规操作了,但问题依然存在,想请各位大佬帮忙分析下~

先给大家看看错误截图:
Flutter升级后编译错误截图

下面是具体的错误信息:

第一个错误:可空类型不匹配

Error: The argument type 'BorderRadius?' can't be assigned to the parameter type 'BorderRadiusGeometry' because 'BorderRadius?' is nullable and 'BorderRadiusGeometry' isn't.

'BorderRadius' is from 'package:flutter/src/painting/border_radius.dart' ('../SDK/flutter/packages/flutter/lib/src/painting/border_radius.dart').

'BorderRadiusGeometry' is from 'package:flutter/src/painting/border_radius.dart' ('../SDK/flutter/packages/flutter/lib/src/painting/border_radius.dart').

出错代码行(border_radius.dart:1):
borderRadius: _cornerRadiusAnimation.value,

第二个错误:参数不存在

Error: No named parameter with the name 'isAlwaysShown'.

出错代码行(step_page_scaffold.dart:340):
isAlwaysShown: false,
^^^^^^^^^^^^^

Context: Found this candidate, but the arguments don't match.

scrollbar.dart:87
const Scrollbar({

我已经执行过flutter clean和flutter pub upgrade命令,重新构建项目还是弹出这两个错误,有没有朋友遇到过类似的问题,或者知道该怎么修复呀?

备注:内容来源于stack exchange,提问作者Sai Kumar

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 15:12:58