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
feec13a1
Unverified
Commit
feec13a1
authored
Jun 10, 2022
by
cedvdb
Committed by
GitHub
Jun 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove duplicated key in _IconButtonM3 (#105577)
parent
e09c1325
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
icon_button.dart
packages/flutter/lib/src/material/icon_button.dart
+0
-2
icon_button_test.dart
packages/flutter/test/material/icon_button_test.dart
+16
-0
No files found.
packages/flutter/lib/src/material/icon_button.dart
View file @
feec13a1
...
...
@@ -497,7 +497,6 @@ class IconButton extends StatelessWidget {
);
}
return
_IconButtonM3
(
key:
key
,
style:
adjustedStyle
,
onPressed:
onPressed
,
autofocus:
autofocus
,
...
...
@@ -577,7 +576,6 @@ class IconButton extends StatelessWidget {
class
_IconButtonM3
extends
ButtonStyleButton
{
const
_IconButtonM3
({
super
.
key
,
required
super
.
onPressed
,
super
.
style
,
super
.
focusNode
,
...
...
packages/flutter/test/material/icon_button_test.dart
View file @
feec13a1
...
...
@@ -28,6 +28,22 @@ void main() {
mockOnPressedFunction
=
MockOnPressedFunction
();
});
testWidgets
(
'test icon is findable by key'
,
(
WidgetTester
tester
)
async
{
const
ValueKey
<
String
>
key
=
ValueKey
<
String
>(
'icon-button'
);
await
tester
.
pumpWidget
(
wrap
(
useMaterial3:
true
,
child:
IconButton
(
key:
key
,
onPressed:
()
{},
icon:
const
Icon
(
Icons
.
link
),
),
),
);
expect
(
find
.
byKey
(
key
),
findsOneWidget
);
});
testWidgets
(
'test default icon buttons are sized up to 48'
,
(
WidgetTester
tester
)
async
{
final
bool
material3
=
theme
.
useMaterial3
;
await
tester
.
pumpWidget
(
...
...
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