toJson method

  1. @override
dynamic toJson(
  1. String? input
)

Implementation

@override
dynamic toJson(String? input) {
  if (input == null) {
    return null;
  }
  return int.tryParse(input) ?? input;
}