buijs-dev/klutter

Add support for all standard datatypes

Closed this issue · 1 comments

TLDR: Maps/arrays are not supported right now which means any KlutterJSON implementation using a map will not be converted to a Dart DTO.

Solution:
Expand the DartKotlinMap with the following types and add support for code generation based on these types:
INTEGER("Int", "int"),
DOUBLE("Double", "double"),
BOOLEAN("Boolean", "bool"),
STRING("String", "String"),
NOTHING("Unit", "void"),
LONG("Long", "int"),
BYTE_ARRAY("Uint8List","ByteArray"),
INT_ARRAY("Int32List","IntArray"),
LONG_ARRAY("Int64List","LongArray"),
FLOAT_ARRAY("Float32List","FloatArray"),
DOUBLE_ARRAY("Float64List", "DoubleArray"),
LIST("List", "List"),
MAP("Map", "HasMap");

All standard types are supported in 2023.1.1.beta (dart 0.3.0) and newer.