toEncodable function

dynamic toEncodable(
  1. dynamic object
)

Implementation

dynamic toEncodable(object) {
  if (object is String ||
      object is num ||
      object is Map ||
      object is List ||
      object is bool) return object;
  return '$object';
}