Unverified Commit c7813026 authored by Mitchell Goodwin's avatar Mitchell Goodwin Committed by GitHub

Swap iOS back button icon in Material app bar (#134754)

Fixes #128555.

Changes the back icon for the Material app bar when running on Apple devices from `arrow_back_ios` to `arrow_back_ios_new_rounded`, as the old version of the icon wasn't centered (https://github.com/google/material-design-icons/issues/824) and the native back icon, as well as the one in Cupertino, are rounded.

| Before | After |
| ------------- | ------------- |
| <img width="295" alt="Screenshot 2023-09-14 at 11 24 10 AM" src="https://github.com/flutter/flutter/assets/58190796/242e5fae-1107-4e1d-9749-a988462e7767"> | <img width="285" alt="Screenshot 2023-09-14 at 11 23 50 AM" src="https://github.com/flutter/flutter/assets/58190796/4df1ecaa-4313-4eb3-9cf3-335a777e133f"> |

New icon works as expected with RTL:

<img width="283" alt="Screenshot 2023-09-14 at 10 57 34 AM" src="https://github.com/flutter/flutter/assets/58190796/ae92fb35-40fd-4ee0-be60-cd452f16b2e3">
parent 37510051
......@@ -153,7 +153,7 @@ class BackButtonIcon extends StatelessWidget {
return Icons.arrow_back;
case TargetPlatform.iOS:
case TargetPlatform.macOS:
return Icons.arrow_back_ios;
return Icons.arrow_back_ios_new_rounded;
}
},
getAndroidSemanticsLabel: (MaterialLocalizations materialLocalization) {
......
......@@ -856,7 +856,7 @@ void main() {
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.android, TargetPlatform.fuchsia }));
testWidgetsWithLeakTracking('Back arrow uses correct default', (WidgetTester tester) async {
await expectBackIcon(tester, kIsWeb ? Icons.arrow_back : Icons.arrow_back_ios);
await expectBackIcon(tester, kIsWeb ? Icons.arrow_back : Icons.arrow_back_ios_new_rounded);
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.macOS }));
});
......
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