Assert that required dialog context args are non-null (#16890)

This commit is contained in:
Hans Muller 2018-04-27 16:33:38 -07:00 committed by GitHub
parent 396298fb39
commit 6334da0109
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,7 @@ void showAboutDialog({
String applicationLegalese,
List<Widget> children,
}) {
assert(context != null);
showDialog<void>(
context: context,
builder: (BuildContext context) {
@ -185,6 +186,7 @@ void showLicensePage({
Widget applicationIcon,
String applicationLegalese
}) {
assert(context != null);
Navigator.push(context, new MaterialPageRoute<void>(
builder: (BuildContext context) => new LicensePage(
applicationName: applicationName,