最佳答案
我有以下 AlertDialog
。
showDialog(
context: context,
child: new AlertDialog(
title: const Text("Location disabled"),
content: const Text(
"""
Location is disabled on this device. Please enable it and try again.
"""),
actions: [
new FlatButton(
child: const Text("Ok"),
onPressed: _dismissDialog,
),
],
),
);
我怎样才能使 _dismissDialog()
撤销所说的 AlertDialog
?