fix: 通过移除内边距解决验证码数字显示不全问题

- 添加 contentPadding: EdgeInsets.zero 移除默认内边距
- 添加 isDense: true 使用紧凑模式
- 移除之前错误的 showCursor 逻辑

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-21 17:59:21 -08:00
parent 979780dd7e
commit b49c9e1af5
1 changed files with 7 additions and 7 deletions

View File

@ -232,13 +232,12 @@ class _SmsVerifyPageState extends ConsumerState<SmsVerifyPage> {
}
void _onCodeChanged(int index, String value) {
// showCursor
setState(() {
//
if (_errorMessage != null) {
//
if (_errorMessage != null) {
setState(() {
_errorMessage = null;
}
});
});
}
if (value.isNotEmpty) {
//
@ -378,7 +377,6 @@ class _SmsVerifyPageState extends ConsumerState<SmsVerifyPage> {
keyboardType: TextInputType.number,
textAlign: TextAlign.center,
maxLength: 1,
showCursor: _controllers[index].text.isEmpty, //
inputFormatters: [
FilteringTextInputFormatter.digitsOnly,
],
@ -386,6 +384,8 @@ class _SmsVerifyPageState extends ConsumerState<SmsVerifyPage> {
counterText: '',
filled: true,
fillColor: const Color(0xFFF5F5F5),
contentPadding: EdgeInsets.zero, //
isDense: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.r),
borderSide: BorderSide.none,