getInt abstract method

Future<int> getInt(
  1. String key
)

getInt use for get integer value

return integer according to key, if key is not found then throw PrefException exception

Example :

ProSheredPreference sheredPrefHelper = ProSheredPreference();

try {
  int result = await sheredPrefHelper.getInt("key");
  print(result);       // print integer according to key
} on PrefException catch (e) {
  print(e.toString());
}

Implementation

Future<int> getInt(String key);