Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
14dcbb2d
Unverified
Commit
14dcbb2d
authored
Jul 17, 2020
by
Jimmy Wei
Committed by
GitHub
Jul 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix overflow issue caused by a long title/subtitle for the vertical stepper (#61623)
parent
30e556dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
3 deletions
+58
-3
stepper.dart
packages/flutter/lib/src/material/stepper.dart
+5
-3
stepper_test.dart
packages/flutter/test/material/stepper_test.dart
+53
-0
No files found.
packages/flutter/lib/src/material/stepper.dart
View file @
14dcbb2d
...
...
@@ -520,9 +520,11 @@ class _StepperState extends State<Stepper> with TickerProviderStateMixin {
_buildLine
(!
_isLast
(
index
)),
],
),
Container
(
margin:
const
EdgeInsetsDirectional
.
only
(
start:
12.0
),
child:
_buildHeaderText
(
index
),
Expanded
(
child:
Container
(
margin:
const
EdgeInsetsDirectional
.
only
(
start:
12.0
),
child:
_buildHeaderText
(
index
),
)
),
],
),
...
...
packages/flutter/test/material/stepper_test.dart
View file @
14dcbb2d
...
...
@@ -663,4 +663,57 @@ void main() {
await
tester
.
pump
();
expect
(
disabledNode
.
hasPrimaryFocus
,
isFalse
);
});
testWidgets
(
'Stepper header title should not overflow'
,
(
WidgetTester
tester
)
async
{
const
String
longText
=
'A long long long long long long long long long long long long text'
;
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Material
(
child:
ListView
(
children:
<
Widget
>[
Stepper
(
steps:
const
<
Step
>[
Step
(
title:
Text
(
longText
),
content:
Text
(
'Text content'
)
),
],
),
],
),
),
),
);
expect
(
tester
.
takeException
(),
isNull
);
});
testWidgets
(
'Stepper header subtitle should not overflow'
,
(
WidgetTester
tester
)
async
{
const
String
longText
=
'A long long long long long long long long long long long long text'
;
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Material
(
child:
ListView
(
children:
<
Widget
>[
Stepper
(
steps:
const
<
Step
>[
Step
(
title:
Text
(
'Regular title'
),
subtitle:
Text
(
longText
),
content:
Text
(
'Text content'
)
),
],
),
],
),
),
),
);
expect
(
tester
.
takeException
(),
isNull
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment