setProfile static method

void setProfile(
  1. String profile, {
  2. String? data,
})

Implementation

static void setProfile(String profile,{String? data}) async {
  SharedPreferences pref = await SharedPreferences.getInstance();
  await pref.setString(Key_profile, profile);
  if (data != null){
    await pref.setString(Key_profile2, data);
  }
}