Repository navigation
BackButtonIcon should never use iOS/MacOS style when running on Web #107646
Description
Activity
- addedcustomer: googleVarious Google teamsVarious Google teamsP1High-priority issues at the top of the work listHigh-priority issues at the top of the work list
on Jul 14, 2022 - addedframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packages
on Jul 14, 2022 Since
BackButtonis a widget in the Material library, following what Material Web does in web browsers seems to be the correct solution.A related issue, which goes beyond this widget, is that Flutter lacks a generic, minimally-styled widget set from which users can build custom widgets.
Thanks for taking a look @InMatrix ! In this case, I believe we should update the
_getIconDatalogic to always useIcons.arrow_backfor web (i.e.kIsWeb), as I believe Material Web library always uses this icon.Is Flutter Framework eng team comfortable with this change?
- assignedand unassignedandHansMuller
on Aug 2, 2022 PlatformAdaptiveIconshas the same problem as_getIconData. There is an_isCupertino()method that (incorrectly) returnstrueforTargetPlatform.macOSregardless of whether it is running in a web browser. Among other things, this means that overflow menus created usingPopupMenuButtonwill use the wrong icon by default on macOS web.Will try to get this issue resolved as part of #118229
- added a commit that references this issue
on Feb 22, 2023 This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Mar 8, 2023
BackButtonIcon selects a style depending on the underlying OS. This applies even when the app is Flutter Web e.g. running Chrome on Mac OS. I think that on kIsWeb, we should instead always use 'Icons.arrow_back' regardless of the underlying OS.
Current logic in back_button.dart:
As a user, this feels weird because this style of back button, which is famously required everywhere in native iOS apps, is not expected by material app users on Web. Rationale:
See Gmail screenshot:



Calendar screenshot:
Apple store screenshot: