Cache udid

This commit is contained in:
2025-09-06 13:09:27 +08:00
parent 9f2f1c0848
commit f7dad5e419

View File

@@ -1,5 +1,11 @@
import 'package:flutter_udid/flutter_udid.dart';
String? _cachedUdid;
Future<String> getUdid() async {
return await FlutterUdid.consistentUdid;
if (_cachedUdid != null) {
return _cachedUdid!;
}
_cachedUdid = await FlutterUdid.consistentUdid;
return _cachedUdid!;
}