-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dialog: Use Cupertino-flavored alert dialogs on iOS #996
Comments
Hi I'm keen to get involved with this project and this issue looks like a good place to start, can I have a go at it? |
@u7088495 Please take a look at the Zulip project's guide to getting involved with the code: |
As demonstrated, in |
Sounds good!
I think it may be fine, actually, to accept the default styling, instead of overriding it with our custom styles with "Source Sans 3". If we were using a native iOS API to show these alerts, we'd get whatever system-defined styles Apple chooses—like what's illustrated in this interface guidelines doc from Apple—and Flutter's defaults understandably mimic those. |
@u7088495 I think the most effective venue for getting that question answered would be in chat, in #mobile-dev-help. That will also help keep this issue thread focused. |
…et platform AlertDialog was changed to AlertDialog.adaptive to the effect described in zulip#996. _adaptiveAction was implemented to display a platform appropriate action for AlertDialog.adaptive's actions param, as was also discussed in zulip#996. tests in dialog_test were updated to perform platform appropriate tests.
…et platform Fixes: zulip#996
We should experiment with the
AlertDialog.adaptive
constructor, instead ofAlertDialog
, which forces a Material-style dialog on iOS:The "after" screenshot was made by simply changing
AlertDialog(
toAlertDialog.adaptive(
. A complete fix will be a little more complicated than that, though. See the code sample on theAlertDialog.adaptive
doc, which shows a platform switch for the dialog's action buttons, to style those appropriately (including the buttons' on-press appearance):Relatedly, I think the
TextAlign.end
in our_dialogActionText
helper should not be applied on iOS because on iOS the button text is meant to be center-aligned.I also notice that our "Source Sans 3" font isn't being applied in the Cupertino-style dialog in the screenshot.
I think we want it to be, so we should debug and fix this.Probably should leave this be, actually; it's supposed to mimic the native iOS alert, which uses a system font, not an app's chosen font.The text was updated successfully, but these errors were encountered: