diff --git a/head/schema-dart/test/inputs/dart/dart-runtime-type-names.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/dart/dart-runtime-type-names.schema/default/TopLevel.dart
new file mode 100644
index 0000000..14fdbde
--- /dev/null
+++ b/head/schema-dart/test/inputs/dart/dart-runtime-type-names.schema/default/TopLevel.dart
@@ -0,0 +1,135 @@
+// To parse this JSON data, do
+//
+//     final topLevel = topLevelFromJson(jsonString);
+
+import 'dart:convert';
+
+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
+
+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
+
+class TopLevel {
+    final String code;
+    final DateTimeClass dateTime;
+    final EnumValuesClass enumValues;
+    final FormatExceptionClass formatException;
+    final RegExpClass regExp;
+    final Status status;
+    final DateTime timestamp;
+
+    TopLevel({
+        required this.code,
+        required this.dateTime,
+        required this.enumValues,
+        required this.formatException,
+        required this.regExp,
+        required this.status,
+        required this.timestamp,
+    });
+
+    factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
+        code: ((x) => RegExp("^[a-z]+\u0024").hasMatch(x) ? x : throw FormatException("Expected matching string"))(((x) => x.length >= 1 && true ? x : throw FormatException("Expected bounded string"))(json["code"])),
+        dateTime: DateTimeClass.fromJson(json["dateTime"]),
+        enumValues: EnumValuesClass.fromJson(json["enumValues"]),
+        formatException: FormatExceptionClass.fromJson(json["formatException"]),
+        regExp: RegExpClass.fromJson(json["regExp"]),
+        status: statusValues.map[json["status"]]!,
+        timestamp: DateTime.parse(json["timestamp"]),
+    );
+
+    Map<String, dynamic> toJson() => {
+        "code": code,
+        "dateTime": dateTime.toJson(),
+        "enumValues": enumValues.toJson(),
+        "formatException": formatException.toJson(),
+        "regExp": regExp.toJson(),
+        "status": statusValues.reverse[status],
+        "timestamp": timestamp.toIso8601String(),
+    };
+}
+
+class DateTimeClass {
+    final int value;
+
+    DateTimeClass({
+        required this.value,
+    });
+
+    factory DateTimeClass.fromJson(Map<String, dynamic> json) => DateTimeClass(
+        value: json["value"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "value": value,
+    };
+}
+
+class EnumValuesClass {
+    final String label;
+
+    EnumValuesClass({
+        required this.label,
+    });
+
+    factory EnumValuesClass.fromJson(Map<String, dynamic> json) => EnumValuesClass(
+        label: json["label"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "label": label,
+    };
+}
+
+class FormatExceptionClass {
+    final int count;
+
+    FormatExceptionClass({
+        required this.count,
+    });
+
+    factory FormatExceptionClass.fromJson(Map<String, dynamic> json) => FormatExceptionClass(
+        count: json["count"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "count": count,
+    };
+}
+
+class RegExpClass {
+    final bool active;
+
+    RegExpClass({
+        required this.active,
+    });
+
+    factory RegExpClass.fromJson(Map<String, dynamic> json) => RegExpClass(
+        active: json["active"],
+    );
+
+    Map<String, dynamic> toJson() => {
+        "active": active,
+    };
+}
+
+enum Status {
+    READY,
+    DONE
+}
+
+final statusValues = EnumValues({
+    "ready": Status.READY,
+    "done": Status.DONE
+});
+
+class EnumValues<T> {
+    Map<String, T> map;
+    late Map<T, String> reverseMap;
+
+    EnumValues(this.map);
+
+    Map<T, String> get reverse {
+            reverseMap = map.map((k, v) => MapEntry(v, k));
+            return reverseMap;
+    }
+}
diff --git a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
index 16b29ad..ab4f2be 100644
--- a/base/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
+++ b/head/schema-dart/test/inputs/schema/vega-lite.schema/default/TopLevel.dart
@@ -4840,7 +4840,7 @@ class Predicate {
 ///If both month and quarter are provided, month has higher precedence.
 ///`day` cannot be combined with other date.
 ///We accept string for month and day names.
-class DateTime {
+class DateTimeClass {
     
     ///Integer value representing the date from 1-31.
     final double? date;
@@ -4879,7 +4879,7 @@ class DateTime {
     ///Integer value representing the year.
     final double? year;
 
-    DateTime({
+    DateTimeClass({
         this.date,
         this.day,
         this.hours,
@@ -4892,7 +4892,7 @@ class DateTime {
         this.year,
     });
 
-    factory DateTime.fromJson(Map<String, dynamic> json) => DateTime(
+    factory DateTimeClass.fromJson(Map<String, dynamic> json) => DateTimeClass(
         date: json["date"]?.toDouble() == null ? null : ((x) => x >= 1 && x <= 31 ? x : throw FormatException("Expected bounded number"))(json["date"]?.toDouble()),
         day: json["day"],
         hours: json["hours"]?.toDouble() == null ? null : ((x) => x >= 0 && x <= 23 ? x : throw FormatException("Expected bounded number"))(json["hours"]?.toDouble()),
