getValue<T> static method
Implementation
static Future getValue<T>(String key, T defaultValue) async {
if (defaultValue is int) {
return readInt(key, defaultValue);
} else if (defaultValue is bool) {
return readBool(key, defaultValue);
} else if (defaultValue is double) {
return readDouble(key, defaultValue);
} else if (defaultValue is String) {
return readString(key, defaultValue);
} else if (defaultValue is List<String>) {
return readStringList(key);
}
}