@override Uint8List encode(Object value) { if (value is! String) { throw Exception('String value expected for type "string"'); } return super.encode(stringToBytesUtf8(value)); }