createType function
Type
createType({
- String name = '<missing name>',
- String aliasOfName = "",
- Type? arrayOf,
- Type? optionalOf,
- void serialize(
- Type self,
- SerialBuffer buffer,
- dynamic data, {
- required bool allowExtensions,
- SerializerState? state,
- dynamic deserialize(
- Type self,
- SerialBuffer buffer, {
- required bool allowExtensions,
- SerializerState? state,
- String baseName = "",
- List<
Field> fields = const [], - Type? extensionOf,
Implementation
Type createType({
String name = '<missing name>',
String aliasOfName = "",
Type? arrayOf,
Type? optionalOf,
void Function(
Type self,
SerialBuffer buffer,
dynamic data, {
SerializerState? state,
required bool allowExtensions,
})?
serialize,
dynamic Function(
Type self,
SerialBuffer buffer, {
SerializerState? state,
required bool allowExtensions,
})?
deserialize,
String baseName: "",
List<Field> fields: const [],
Type? extensionOf,
}) {
var t = Type(
aliasOfName: aliasOfName,
name: name,
arrayOf: arrayOf,
optionalOf: optionalOf,
extensionOf: extensionOf,
base: null,
baseName: baseName,
fields: fields,
serialize: serialize,
deserialize: deserialize);
return t;
}