29 lines
770 B
Dart
29 lines
770 B
Dart
// Label StoreMAX
|
|
//
|
|
// Created by Anthony Gordon.
|
|
// 2020, WooSignal Ltd. All rights reserved.
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class SharedPref {
|
|
read(String key) async {
|
|
final prefs = await SharedPreferences.getInstance();
|
|
return prefs.getString(key);
|
|
}
|
|
|
|
save(String key, value) async {
|
|
final prefs = await SharedPreferences.getInstance();
|
|
prefs.setString(key, value);
|
|
}
|
|
|
|
remove(String key) async {
|
|
final prefs = await SharedPreferences.getInstance();
|
|
prefs.remove(key);
|
|
}
|
|
}
|