Skip to content

Commit 17f5405

Browse files
committed
fix: Text is too long
1 parent 9c3066b commit 17f5405

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

lib/pages/detail/widgets/detail_continue_play.dart

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,19 @@ class _DetailContinuePlayState extends State<DetailContinuePlay> {
119119
children: [
120120
const Icon(fluent.FluentIcons.play),
121121
const SizedBox(width: 5),
122-
Text(
123-
FlutterI18n.translate(
124-
context,
125-
'detail.continue-watching',
126-
translationParams: {
127-
'episode': history.episodeTitle,
128-
},
122+
Container(
123+
constraints: const BoxConstraints(
124+
maxWidth: 150,
125+
),
126+
child: Text(
127+
FlutterI18n.translate(
128+
context,
129+
'detail.continue-watching',
130+
translationParams: {
131+
'episode': history.episodeTitle,
132+
},
133+
),
134+
maxLines: 1,
129135
),
130136
)
131137
],

lib/pages/home/widgets/home_resent_card.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class _HomeRecentCardState extends State<HomeRecentCard> {
142142
color: Colors.white,
143143
fontSize: 12,
144144
),
145+
maxLines: 1,
145146
),
146147
],
147148
),
@@ -231,6 +232,7 @@ class _HomeRecentCardState extends State<HomeRecentCard> {
231232
color: Colors.white,
232233
fontSize: 12,
233234
),
235+
maxLines: 1,
234236
),
235237
if (_update.isNotEmpty) ...[
236238
const SizedBox(height: 8),

0 commit comments

Comments
 (0)