updateSettings method

void updateSettings(
  1. AndrossySettings callback(
    1. AndrossySettings old
    )
)

Implementation

void updateSettings(
  AndrossySettings Function(AndrossySettings old) callback,
) async {
  var raw = androssy.copy(settings: callback(androssy.settings));
  var done = await pref.setString(kAndrossyPath, raw.json);
  if (done) notify(raw);
}