Skip to content

Commit d8a0097

Browse files
committedFeb 27, 2025·
bugfix for verify code line break
1 parent 7fbb326 commit d8a0097

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎lib/page/auth/signup_screen.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import 'package:askaide/page/component/theme/custom_theme.dart';
1616
import 'package:askaide/page/component/windows.dart';
1717
import 'package:askaide/repo/api_server.dart';
1818
import 'package:askaide/repo/settings_repo.dart';
19+
import 'package:auto_size_text/auto_size_text.dart';
1920
import 'package:bot_toast/bot_toast.dart';
2021
import 'package:flutter/gestures.dart';
2122
import 'package:flutter/material.dart';
@@ -242,12 +243,13 @@ class _SignupScreenState extends State<SignupScreen> {
242243
child: verifyCodeWaitSeconds > 0
243244
? TextButton(
244245
onPressed: null,
245-
child: Text(
246+
child: AutoSizeText(
246247
'$verifyCodeWaitSeconds ${AppLocale.retryInSeconds.getString(context)}',
247248
style: TextStyle(
248249
color: customColors.weakTextColor,
249250
fontSize: 15,
250251
),
252+
maxLines: 1,
251253
),
252254
)
253255
: TextButton(

‎lib/page/component/verify_code_input.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:askaide/helper/helper.dart';
44
import 'package:askaide/lang/lang.dart';
55
import 'package:askaide/page/component/dialog.dart';
66
import 'package:askaide/page/component/theme/custom_theme.dart';
7+
import 'package:auto_size_text/auto_size_text.dart';
78
import 'package:flutter/material.dart';
89
import 'package:flutter/services.dart';
910
import 'package:flutter_localization/flutter_localization.dart';
@@ -105,12 +106,13 @@ class _VerifyCodeInputState extends State<VerifyCodeInput> {
105106
child: verifyCodeWaitSeconds > 0
106107
? TextButton(
107108
onPressed: null,
108-
child: Text(
109+
child: AutoSizeText(
109110
'$verifyCodeWaitSeconds ${AppLocale.retryInSeconds.getString(context)}',
110111
style: TextStyle(
111112
color: customColors.weakTextColor,
112113
fontSize: 15,
113114
),
115+
maxLines: 1,
114116
),
115117
)
116118
: TextButton(

0 commit comments

Comments
 (0)
Please sign in to comment.