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
78a0111c
Unverified
Commit
78a0111c
authored
Jun 07, 2022
by
Taha Tesser
Committed by
GitHub
Jun 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `ButtonStyleButton` ink well shape. (#100226)
parent
be0c1bd0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
1 deletion
+46
-1
button_style_button.dart
packages/flutter/lib/src/material/button_style_button.dart
+1
-1
elevated_button_test.dart
packages/flutter/test/material/elevated_button_test.dart
+45
-0
No files found.
packages/flutter/lib/src/material/button_style_button.dart
View file @
78a0111c
...
...
@@ -367,7 +367,7 @@ class _ButtonStyleState extends State<ButtonStyleButton> with MaterialStateMixin
splashFactory:
resolvedSplashFactory
,
overlayColor:
overlayColor
,
highlightColor:
Colors
.
transparent
,
customBorder:
resolvedShape
,
customBorder:
resolvedShape
.
copyWith
(
side:
resolvedSide
)
,
child:
IconTheme
.
merge
(
data:
IconThemeData
(
color:
resolvedForegroundColor
),
child:
Padding
(
...
...
packages/flutter/test/material/elevated_button_test.dart
View file @
78a0111c
...
...
@@ -1554,6 +1554,51 @@ void main() {
expect
(
RendererBinding
.
instance
.
mouseTracker
.
debugDeviceActiveCursor
(
1
),
SystemMouseCursors
.
basic
);
});
testWidgets
(
'Ink Response shape matches Material shape'
,
(
WidgetTester
tester
)
async
{
// This is a regression test for https://github.com/flutter/flutter/issues/91844
Widget
buildFrame
({
BorderSide
?
side
})
{
return
MaterialApp
(
home:
Scaffold
(
body:
Center
(
child:
ElevatedButton
(
style:
ElevatedButton
.
styleFrom
(
side:
side
,
shape:
const
RoundedRectangleBorder
(
side:
BorderSide
(
color:
Color
(
0xff0000ff
),
width:
0
,
),
),
),
onPressed:
()
{
},
child:
const
Text
(
'ElevatedButton'
),
),
),
),
);
}
const
BorderSide
borderSide
=
BorderSide
(
width:
10
,
color:
Color
(
0xff00ff00
));
await
tester
.
pumpWidget
(
buildFrame
(
side:
borderSide
));
expect
(
tester
.
widget
<
InkWell
>(
find
.
byType
(
InkWell
)).
customBorder
,
const
RoundedRectangleBorder
(
side:
borderSide
),
);
await
tester
.
pumpWidget
(
buildFrame
());
await
tester
.
pumpAndSettle
();
expect
(
tester
.
widget
<
InkWell
>(
find
.
byType
(
InkWell
)).
customBorder
,
const
RoundedRectangleBorder
(
side:
BorderSide
(
color:
Color
(
0xff0000ff
),
width:
0.0
,
),
),
);
});
}
TextStyle
_iconStyle
(
WidgetTester
tester
,
IconData
icon
)
{
...
...
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