setSuccess method

Future<void> setSuccess(
  1. bool success
)

Implementation

Future<void> setSuccess(bool success) async {
  _success = success;
  try {
    SharedPreferences prefs = await SharedPreferences.getInstance();
    await prefs.setInt(sync_success_str, success ? 1 : 0);
  } catch (e) {
    debugPrint('Error setting success state: $e');
  }
}