From 061955f6db6c007cc3196d453fca28e02016192f Mon Sep 17 00:00:00 2001 From: guulp <110553417+guulp@users.noreply.github.com> Date: Fri, 22 Dec 2023 14:17:17 -0700 Subject: [PATCH] Update FlutterElement.java --- src/main/java/io/github/ashwith/flutter/FlutterElement.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/io/github/ashwith/flutter/FlutterElement.java b/src/main/java/io/github/ashwith/flutter/FlutterElement.java index 2e425f4..c38668d 100644 --- a/src/main/java/io/github/ashwith/flutter/FlutterElement.java +++ b/src/main/java/io/github/ashwith/flutter/FlutterElement.java @@ -43,11 +43,11 @@ public Map getRawMap() { * @return Stringify map */ public String serialize(final Map rawMap) { - final JsonPrimitive localInstance = new JsonPrimitive(false); + final JsonPrimitive localInstance = new JsonPrimitive(String.valueOf(false)); Map tempMap = new HashMap<>(); rawMap.forEach( (key, value) -> { - if (value instanceof String || value instanceof Integer) { + if (value instanceof String || value instanceof Integer || value instanceof Boolean) { tempMap.put(key, new JsonPrimitive(String.valueOf(value))); } else if (value instanceof JsonElement) { tempMap.put(key, value);