setDataSP method

Future<void> setDataSP(
  1. ResponseData data
)

Implementation

Future<void> setDataSP(ResponseData data) async {
  try {
    SharedPreferences sp = await SharedPreferences.getInstance();
    await sp.setString(Constant.sharedPrefData, data.toJson());
  } catch (e) {
    rethrow;
  }
}