Unverified Commit 1427fef8 authored by Dan Field's avatar Dan Field Committed by GitHub

Make sure fab semantics end up on top (#34512)

parent 8f75d537
......@@ -462,11 +462,9 @@ class FloatingActionButton extends StatelessWidget {
);
if (tooltip != null) {
result = MergeSemantics(
child: Tooltip(
message: tooltip,
child: result,
),
result = Tooltip(
message: tooltip,
child: result,
);
}
......@@ -477,7 +475,7 @@ class FloatingActionButton extends StatelessWidget {
);
}
return result;
return MergeSemantics(child: result);
}
@override
......
......@@ -763,6 +763,22 @@ void main() {
paintsExactlyCountTimes(#clipPath, 0),
);
});
testWidgets('Can find FloatingActionButton semantics', (WidgetTester tester) async {
await tester.pumpWidget(MaterialApp(
home: FloatingActionButton(onPressed: () {}),
));
expect(
tester.getSemantics(find.byType(FloatingActionButton)),
matchesSemantics(
hasTapAction: true,
hasEnabledState: true,
isButton: true,
isEnabled: true,
),
);
}, semanticsEnabled: true);
}
Offset _rightEdgeOfFab(WidgetTester tester) {
......
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