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);