Unverified Commit feec13a1 authored by cedvdb's avatar cedvdb Committed by GitHub

Remove duplicated key in _IconButtonM3 (#105577)

parent e09c1325
......@@ -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,
......
......@@ -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(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment