mirror of
https://github.com/hmalik144/easy_cc_flutter.git
synced 2026-03-18 07:35:54 +00:00
Project lint checked and step added to config.yml
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'CurrencyPair.dart';
|
||||
import 'currency_pair.dart';
|
||||
|
||||
const String CURRENCY_ONE = "conversion_one";
|
||||
const String CURRENCY_TWO = "conversion_two";
|
||||
const String currencyOne = "conversion_one";
|
||||
const String currencyTwo = "conversion_two";
|
||||
class PreferenceProvider {
|
||||
late final SharedPreferences _prefs;
|
||||
|
||||
@@ -12,13 +12,13 @@ class PreferenceProvider {
|
||||
}
|
||||
|
||||
Future<void> saveConversionPair(String s1, String s2) async {
|
||||
await _prefs.setString(CURRENCY_ONE, s1);
|
||||
await _prefs.setString(CURRENCY_TWO, s2);
|
||||
await _prefs.setString(currencyOne, s1);
|
||||
await _prefs.setString(currencyTwo, s2);
|
||||
}
|
||||
|
||||
CurrencyPair getConversionPair() {
|
||||
String? s1 = _prefs.getString(CURRENCY_ONE);
|
||||
String? s2 = _prefs.getString(CURRENCY_TWO);
|
||||
String? s1 = _prefs.getString(currencyOne);
|
||||
String? s2 = _prefs.getString(currencyTwo);
|
||||
|
||||
return CurrencyPair(s1, s2);
|
||||
}
|
||||
Reference in New Issue
Block a user