showDialog with barrierDismissible: false not being honored

This issue has been created since 2022-09-22.

Steps to Reproduce

  • Create an application which shows dialog using showDialog() of material/dialog.dart of source code and send barrierDismissible as false.
  • On Android 12, onBackPress by a user closes the dialog, on older versions of Android, the behavior is as expected (doesn't close dialog).
  • I am using Flutter version: Channel stable, 2.10.4 and android compile and target sdk version 31
exaby73 wrote this answer on 2022-09-22

Hello @kssujithcj. Please upgrade to the latest stable version of Flutter (3.3.2) and confirm if this issue still exists.

kssujithcj wrote this answer on 2022-09-23

On Flutter 3.0.0 also it is the same behavior. Sorry for the confusion. I think I wasn't using the bool properly.
Barrier dismissible will only block dialog closing, on taping outside of the dialog. But it is never intended to block onBackpress()
Solution is to use WillPopScope as mentioned here.

Sorry again and Thank you for your time.

exaby73 wrote this answer on 2022-09-23

No issues @kssujithcj. Please don't be discouraged from raising issues in the future if you feel there is a bug. Thanks anyways :)

More Details About Repo
Owner Name flutter
Repo Name flutter
Full Name flutter/flutter
Language Dart
Created Date 2015-03-06
Updated Date 2022-10-05
Star Count 145516
Watcher Count 3569
Fork Count 23400
Issue Count 11194

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Can we use the eWeLink API without NodeJs ? 7 2020-10-28 2022-07-24
font size is larger in dirvish windows 2 2021-12-19 2022-08-02
cannot download song/playlist 2 2022-06-20 2022-10-05
`@strdict` and `dict_list` with a single parameter do not create a `Dict` of type `{String,Any}` 1 2021-06-30 2022-09-29
Add a new "Manage connection string" permission 1 2021-12-23 2022-02-21
【需求】:希望增加文章摘要默认文字数以及图片样式 2 2021-07-01 2022-09-27
Doc: missing dependencies: cmake, libzstd-dev 0 2021-12-27 2022-09-13
Is there a NuGet feed available? 3 2021-03-03 2022-07-10
XSS issue on inserting a link. 3 2021-07-05 2022-09-27
ksnip window doesn't hide in the screenshot on [email protected] 3 2021-05-23 2022-10-01
Exciting Index Error 5 2022-02-18 2022-09-24
Web crawling does not work 0 2022-10-03 2022-10-03
Recursively scan directories that were found via web crawling 0 2022-10-03 2022-10-03
Can't handle when stream comes in with no audio track 3 2022-03-15 2022-08-02
Add Genesis Account CLI command doesn't update the total supply 0 2021-06-14 2022-09-27
Check on change (without save) 4 2022-06-14 2022-10-01
PostgreSQL: Misconfigured 'Winter\Blog\Models\Post' featured_images relation? 2 2021-06-08 2022-09-21
Subspace error doesn't make sense 3 2022-03-10 2022-09-04
Build fails on aarch64 with OCaml 4.08 9 2021-02-16 2022-08-16
mining paraphrases fails with time-out error 8 2022-02-09 2022-09-23
为何多个TAB里面的form的按钮不能提交? 0 2022-08-29 2022-09-26
Edge无法使用下拉框 0 2021-07-23 2022-01-19
Risk-Calculation Update time lies in the past on some devices 8 2020-06-17 2022-10-05
Add a test (integration or versioned) that exercises via TypeScript 0 2021-11-19 2022-10-02
Support for AES-128 token encryption on video stream. 3 2022-05-27 2022-10-05
azcopy benchmark was failed and test data remains (10.13.0) 1 2021-11-17 2022-09-18
Fix support for CL_UNORM_INT_101010_2 in kernel read write tests 0 2021-06-11 2022-09-04
Make clients uniquely identifiable in a stable way 2 2022-07-16 2022-09-27
Delete old Teams test projects 0 2021-11-18 2022-09-06
Computed moment of inertia is incorrect for non-AABB shapes 0 2021-11-20 2022-09-10
A possible clang bug 5 2022-06-06 2022-07-14
Error involving lambda expression with different return types in `if constexpr` branches 3 2022-06-06 2022-08-03
Audit vulnerabilities detected in the classnames project on Tag: v2.3.1 1 2021-09-30 2022-10-05
sso sample app 6 2021-02-09 2021-12-26
Missing `f` prefix on f-strings 0 2022-04-23 2022-09-21
About CVE-2022-29361 5 2022-06-14 2022-10-05
New router in 2.2.0 changes the behavior of strict_slashes 0 2022-07-25 2022-10-05
Upgrading to 2.2.x results in type errors when importing from werkzeug.routing 3 2022-08-05 2022-10-05
https://nx.dev/module-federation/micro-frontend-architecture 3 2022-09-02 2022-09-09
PLZ GIVE US THE RIGHTS TO DISABLE INLINE SUGGESTIONS!!! 2 2022-08-03 2022-09-10
az boards - copying capacity from last sprint programmatically 4 2022-08-01 2022-09-25
exposeFetcher with custom fetcher func does not work as expected 0 2022-08-12 2022-09-15
Help download s3 boto 1 2022-05-05 2022-09-03
Is there a python package published 0 2021-11-10 2022-08-26
运行npm run dev出错 0 2021-01-04 2021-12-31
Bolus Wizard like calculator without CGM source 6 2022-04-18 2022-09-21
Activating a research fault localization bot on your project? 0 2021-11-10 2022-10-03
Deepar gets wired loss 7 2022-02-15 2022-09-19
ContextSource pool problem when using DirSync 0 2019-05-29 2022-09-02
Add an `ErrorHandler` class 1 2021-10-05 2022-07-30