flutter: dialog: Change barrierDismissible from false to true
If barrierDismissible is true, then tapping this barrier will cause the current route to be popped (see Navigator.pop) with null as the value.
This commit is contained in:
parent
1dbdfe679a
commit
db81c3c2fe
|
@ -163,7 +163,7 @@ class _AboutPageState extends State<AboutPage> {
|
||||||
_showVersionInfo() {
|
_showVersionInfo() {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: true,
|
||||||
builder: (context) => alertDialog(context),
|
builder: (context) => alertDialog(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,7 +434,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
if (result == GameResult.win) {
|
if (result == GameResult.win) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: true,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(dialogTitle,
|
title: Text(dialogTitle,
|
||||||
|
@ -461,7 +461,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
} else {
|
} else {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: true,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(dialogTitle,
|
title: Text(dialogTitle,
|
||||||
|
@ -685,7 +685,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
),
|
),
|
||||||
onPressed: () => showDialog(
|
onPressed: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: true,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: AppTheme.moveHistoryDialogBackgroundColor,
|
backgroundColor: AppTheme.moveHistoryDialogBackgroundColor,
|
||||||
|
@ -728,7 +728,7 @@ class _GamePageState extends State<GamePage> with RouteAware {
|
||||||
),
|
),
|
||||||
onPressed: () => showDialog(
|
onPressed: () => showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
barrierDismissible: false,
|
barrierDismissible: true,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
backgroundColor: AppTheme.hintDialogackgroundColor,
|
backgroundColor: AppTheme.hintDialogackgroundColor,
|
||||||
|
|
Loading…
Reference in New Issue