readInt method

int? readInt(
  1. String key
)

Implementation

int? readInt(String key) {
  final value = getString(key);
  if (value == null) return null;
  int? num;
  try {
    num = jsonDecode(value);
  } catch (err) {
    debugPrint(err.toString());
  }
  return num;
}