mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-11 23:40:57 +00:00
Dart: binary lists (typed_data) (#6839)
* Dart - add eager mode to Uint8ListReader * Dart - add Int8ListReader * Dart - use binary reader where useful * Dart - test binary list reader laziness * Dart - update generated code
This commit is contained in:
@@ -335,6 +335,14 @@ class DartGenerator : public BaseGenerator {
|
||||
if (type.base_type == BASE_TYPE_BOOL) {
|
||||
return prefix + ".BoolReader()";
|
||||
} else if (IsVector(type)) {
|
||||
if (!type.VectorType().enum_def) {
|
||||
if (type.VectorType().base_type == BASE_TYPE_CHAR) {
|
||||
return prefix + ".Int8ListReader(" + (lazy ? ")" : "lazy: false)");
|
||||
}
|
||||
if (type.VectorType().base_type == BASE_TYPE_UCHAR) {
|
||||
return prefix + ".Uint8ListReader(" + (lazy ? ")" : "lazy: false)");
|
||||
}
|
||||
}
|
||||
return prefix + ".ListReader<" +
|
||||
GenDartTypeName(type.VectorType(), current_namespace, def) + ">(" +
|
||||
GenReaderTypeName(type.VectorType(), current_namespace, def, true,
|
||||
|
||||
Reference in New Issue
Block a user