flutter - Flutter 2.x 升级抱怨 Snapshotting a view for text form field
问题描述
我最近升级了颤振,以下是规格
[✓] Flutter (Channel stable, 2.2.2, on macOS 11.4 20F71 darwin-x64, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.57.1)
升级后,我在下面看到表单字段的日志。任何想法如何解决这一问题 ?
日志
[Snapshotting] Snapshotting a view (0x14f2ab100, _UIReplicantView) that has not been rendered at least once requires afterScreenUpdates:YES.
[Snapshotting] Snapshotting a view (0x14f4ae880, _UIReplicantView) that has not been rendered at least once requires afterScreenUpdates:YES.
[Snapshotting] Snapshotting a view (0x14f29a460, _UIReplicantView) that has not been rendered at least once requires afterScreenUpdates:YES.
表单域
TextFormField(
controller: controller,
textAlignVertical: TextAlignVertical.center,
validator:(){},
onSaved: (){},
enableInteractiveSelection: false,
style: GoogleFonts.poppins(
color: Theme.of(context).highlightColor,
fontSize: 14.5,
fontWeight: FontWeight.w500,
letterSpacing: 0.5,
),
textInputAction: TextInputAction.done,
keyboardType: TextInputType.text,
textCapitalization: TextCapitalization.words,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(0),
helperStyle: GoogleFonts.poppins(
color: Theme.of(context).highlightColor,
fontWeight: FontWeight.w500,
letterSpacing: 0.5,
),
errorStyle: GoogleFonts.poppins(
fontSize: 13.0,
fontWeight: FontWeight.w500,
letterSpacing: 0.5,
color: Theme.of(context).highlightColor,
),
hintStyle: GoogleFonts.poppins(
color: Theme.of(context).highlightColor,
fontSize: 14.5,
fontWeight: FontWeight.w500,
letterSpacing: 0.5,
),
prefixIcon: Icon(
iconData,
color: Theme.of(context).highlightColor,
),
prefixIconConstraints: BoxConstraints(
minWidth: 50.0,
),
labelText: labelText,
labelStyle: GoogleFonts.poppins(
fontSize: 14.5,
fontWeight: FontWeight.w500,
letterSpacing: 0.5,
color: Theme.of(context).highlightColor,
),
enabledBorder: const OutlineInputBorder(
// width: 0.0 produces a thin "hairline" border
borderSide: const BorderSide(color: Colors.white, width: 0.0),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.0),
),
),
);
发布规范.yaml
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
awesome_card: ^1.1.0
carousel_pro: ^1.0.0
carousel_slider: ^3.0.0
cloud_firestore: ^2.1.0
cupertino_icons: ^1.0.2
extended_image: ^4.1.0
firebase_analytics: ^8.0.4
firebase_auth: ^1.0.1
firebase_core: ^1.0.1
firebase_dynamic_links: ^2.0.3
firebase_messaging: ^9.0.0
firebase_storage: ^8.0.0
another_flushbar: ^1.10.22
flutter_bloc: ^7.0.0
flutter_email_sender: ^5.0.0
flutter_local_notifications: ^5.0.0-nullsafety.1
flutter_share: ^2.0.0
flutter_svg: ^0.22.0
font_awesome_flutter: ^9.0.0
full_screen_image: ^1.0.2
google_fonts: ^2.0.0
http: ^0.13.0
image_cropper: ^1.4.0
image_picker: ^0.7.3
intl: ^0.17.0
introduction_screen: ^2.0.0
path_provider: ^2.0.1
shared_preferences: ^2.0.5
shimmer: ^2.0.0
transparent_image: ^2.0.0
uuid: ^3.0.1
badges: ^2.0.1
解决方案
推荐阅读
- automation - 管理项目中源库的工具(没有子模块)?
- jenkins - 如何制作詹金斯 HA?
- php - 如何在 php codeigniter 3.1.9 中声明全局变量?
- vba - 如何在访问 vba 中为固定导入规范转换/重命名未知文件类型
- angular7 - 使用 @ngrx/Effect 效果不会被动作触发
- python - 初始化数据库后首次加载时无法在输入框中输入输入?
- pandas - 熊猫日期时间在图中显示为数字
- laravel - JWT laravel:检查身份验证。即使我设置了令牌,也无法检查用户是否已通过身份验证
- delphi - 变量“xxx”可能尚未初始化
- hyperledger-fabric - 获取链码代码 mycc 时出错:链码的路径不存在