-
Notifications
You must be signed in to change notification settings - Fork 21
Closed
Description
I use the showCustomAlert method to use the alert of confirmation.
In v0.6.1, showCustomAlert cannot apply the IosAlertOptions config. So I wrote the code below, and then showCustomAlert would show a strange alert, such as the image.
FlutterPlatformAlert.showCustomAlert(
windowTitle: '削除',
text: '削除します。よろしいですか?',
positiveButtonTitle: '削除',
negativeButtonTitle: 'キャンセル',
options: PlatformAlertOptions(
ios: IosAlertOptions(
positiveButtonStyle: IosButtonStyle.destructive,
negativeButtonStyle: IosButtonStyle.cancel,
),
),
).then((result) {
if (result == CustomButton.positiveButton) {
Logger().d('削除しました');
}
});
So please fix it.
I tried to find the reason for this, so I saw it.
Comparing FlutterPlatformAlertPlugin.swift in v0.6.1 and SwiftFlutterPlatformAlertPlugin.swift in v0.5.3, I found that v0.5.3 uses styles by args["...ButtonStyle"], but v0.6.1 uses styles by args["...ButtonTitle"], so if users set a word that does not mean abort or cancel, then users fail to set style properly.

Metadata
Metadata
Assignees
Labels
No labels