package com.example.bump import android.content.Context import android.content.Context.MODE_PRIVATE import android.content.SharedPreferences import com.maenle.bump.R class LocalData(context: Context) { private val codeKey = context.getString(R.string.code_key) private val preferenceKey = context.getString(R.string.preference_file_key) private val preferences: SharedPreferences = context.getSharedPreferences(preferenceKey, MODE_PRIVATE) var code: String? get() { return preferences.getString(codeKey, null) } set(codeValue) { preferences.edit().putString(codeKey, codeValue).apply() } // var messages: List<> }