首页 > 解决方案 > 颤振文本字段光标碎片问题

问题描述

框架:Flutter 语言:Dart 在应用程序中的所有文本字段中,光标都是垂直切开的。看起来,我找不到任何导致这种情况的设置。

我怎样才能使它全长?

在此处输入图像描述

我正在使用最新的稳定颤振版本:v1.9.1+hotfix.6

文本字段实现:

  TextEditingController phoneNumber = TextEditingController();

TextField(
              textAlignVertical: TextAlignVertical.center,
              controller: phoneNumber,
              keyboardType: TextInputType.number,
              enabled: true,
              maxLength: 10,
              maxLengthEnforced: true,
              decoration: InputDecoration(

                prefixText: '+91-',
                contentPadding: EdgeInsets.only(left: 5.0, bottom: 5.0),
              ),
            ),

标签: flutter

解决方案


推荐阅读