registerSerializer<T> static method
Registers a serializer for a specific type. Needed for dynamically serializing objects. NOTE: This function is called by generated code in the target Flutter app. You should not call this function directly in your code.
Implementation
static void registerSerializer<T>(Map<String, dynamic> Function(T obj) function) {
serializers[T] = (dynamic obj) => function(obj as T);
}