createListContext function

TypeContext createListContext(
  1. TypeContext reqContext,
  2. String listType,
  3. dynamic responseAs
)

Implementation

TypeContext createListContext(TypeContext reqContext, String listType, dynamic responseAs) {
  var existingInfo = reqContext.getTypeInfo(listType);
  reqContext = TypeContext(
      typeName: listType,
      types: {
        //List<T> in Dart 1.9 (non Strong mode) creates non generic List (dynamic)
        listType: existingInfo ??
            TypeInfo(TypeOf.Class, create: () => responseAs)
      },
      childContext: reqContext);
  return reqContext;
}