From 42ad22f5d34b7af294b4af377e7b6422709c38d6 Mon Sep 17 00:00:00 2001 From: fuwa Date: Wed, 27 Nov 2019 08:43:02 +0000 Subject: [PATCH] fix null cast --- cyberwow/lib/helper.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cyberwow/lib/helper.dart b/cyberwow/lib/helper.dart index cdabea8..3b65e7e 100644 --- a/cyberwow/lib/helper.dart +++ b/cyberwow/lib/helper.dart @@ -32,6 +32,6 @@ int asInt(dynamic x) => x?.toInt() ?? 0; bool asBool(dynamic x) => x ?? false; List asList(dynamic x) => x ?? []; -List> asJsonArray(dynamic x) => x.cast>() ?? []; +List> asJsonArray(dynamic x) => x?.cast>() ?? []; Map asMap(dynamic x) => x ?? {};