From c323017c7bc92133a2e4d58befd3277661ed17b2 Mon Sep 17 00:00:00 2001 From: fuwa Date: Mon, 18 Nov 2019 02:44:50 +0800 Subject: [PATCH] fix a type cast error --- 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 68b2bd0..8e9540d 100644 --- a/cyberwow/lib/helper.dart +++ b/cyberwow/lib/helper.dart @@ -27,7 +27,7 @@ String pretty(dynamic x) { } -int asInt(dynamic x) => x ?? 0; +int asInt(dynamic x) => x?.toInt() ?? 0; bool asBool(dynamic x) => x ?? false;