单独缓存车牌

This commit is contained in:
2026-03-24 09:38:16 +08:00
parent 930953780d
commit d3edf95df3
4 changed files with 203 additions and 247 deletions

View File

@@ -357,10 +357,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";

View File

@@ -3,6 +3,7 @@ import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:getx_scaffold/common/utils/log_util.dart';
import 'package:ln_jq_app/common/model/vehicle_info.dart';
import 'package:shared_preferences/shared_preferences.dart';
/// 定义登录渠道的枚举类型
enum LoginChannel {
@@ -103,6 +104,9 @@ class StorageService extends GetxService {
Future<void> saveVehicleInfo(VehicleInfo data) async {
await _box.write(_vehicleInfoKey, vehicleInfoToJson(data));
final SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setString('plateNumber', data.plateNumber ?? "");
}
Future<void> saveStationCredentials(String account, String password) async {
@@ -117,6 +121,9 @@ class StorageService extends GetxService {
Future<void> clearVehicleInfo() async {
await _box.remove(_vehicleInfoKey);
final SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.remove('plateNumber');
}
Future<void> clearStationCredentials() async {

File diff suppressed because it is too large Load Diff

View File

@@ -40,6 +40,7 @@ dependencies:
encrypt: ^5.0.3
get_storage: ^2.1.1
shared_preferences: ^2.5.4
flutter_native_splash: ^2.4.7
dropdown_button2: ^2.3.8